DTSFileSystemOperation Enumeration
Indicates the file-system operation to perform.
Assembly: Microsoft.SqlServer.FileSystemTask (in Microsoft.SqlServer.FileSystemTask.dll)
| Member name | Description | |
|---|---|---|
| CopyDirectory | The FileSystemTask will copy a directory. Both IsDestinationPathVariable and IsSourcePathVariable must be set. | |
| CopyFile | The FileSystemTask will copy a file. Both IsDestinationPathVariable and IsSourcePathVariable must be set. | |
| CreateDirectory | The FileSystemTask will create a directory. IsSourcePathVariable must be set. | |
| DeleteDirectory | The FileSystemTask will delete a directory. IsSourcePathVariable must be set. | |
| DeleteDirectoryContent | The FileSystemTask will delete the content of a directory. IsSourcePathVariable must be set. | |
| DeleteFile | The FileSystemTask will delete a file. IsSourcePathVariable must be set. | |
| MoveDirectory | The FileSystemTask will move a directory. Both IsDestinationPathVariable and IsSourcePathVariable must be set. | |
| MoveFile | The FileSystemTask will move a file. Both IsDestinationPathVariable and IsSourcePathVariable must be set. | |
| RenameFile | The FileSystemTask will rename a file. Both IsDestinationPathVariable and IsSourcePathVariable must be set. | |
| SetAttributes | The FileSystemTask will set the attributes of a file or directory. Both IsDestinationPathVariable and IsSourcePathVariable must be set. |
The following code example creates a FileSystemTask as an Executable in a package. The FileSystemTask copies a test folder, which contains two subfolders and a .txt file, to another folder. The folder and subfolders are copied because the action to perform, as indicated by the Operation property, is set to CopyDirectory.