# Delete Files v1# Delete files or folders. (The minimatch patterns will only match file paths, not folder paths).- task:DeleteFiles@1 inputs:#SourceFolder: # string. Source Folder. Contents:'myFileShare'# string. Required. Contents. Default: myFileShare.
Inputs
SourceFolder - Source Folder string.
If the source folder is empty, the task deletes files from the root folder of the repository as though $(Build.SourcesDirectory) was specified.
If your build produces artifacts outside of the sources directory, specify $(Agent.BuildDirectory) to delete files from the build agent working directory.
The file/folder paths to delete. Supports multiple lines of minimatch patterns; each one is processed before moving onto the next line. Learn more about File matching patterns.
For example:
**/* deletes all files and folders in the root folder.
temp deletes the temp folder in the root folder.
temp* deletes any file or folder in the root folder with a name that begins with temp.
**/temp/* deletes all files and folders in any sub-folder named temp.
**/temp* deletes any file or folder with a name that begins with temp.
!(*.vsix) deletes all files in the root folder that do not have a .vsix extension.
Attempts to remove the source folder after attempting to remove Contents. If you want to remove the whole folder, set this to true and set Contents to *.
RemoveDotFiles - Remove files starting with a dot boolean. Default value: false.
Deletes files starting with a dot. For example: .git and .dockerfile. Omits these files if it's not specified explicitly. For example: /.*. Learn more about minimatch.
შემოუერთდით Meetup სერიას, რათა შექმნათ მასშტაბური AI გადაწყვეტილებები რეალურ სამყაროში გამოყენების შემთხვევებზე დაყრდნობით თანამემამულე დეველოპერებთან და ექსპერტებთან.