The create file/folder activity can be used to create files or folder on the local system
uses System.IOUtils.TDirectory.CreateDirectory
uses System.IOUtils.TFile.AppendAllText
Activity properties
begin TDirectory.Copy('C:\...\Codolex\TestData', 'C:\...\Codolex\TestDataCopy'); end; |
Resulting code
The option 'do when folder exists' provides the ability to check if there is already a folder in place with the same name.
If this option is not set, and the folder is in place, the content of the folder will not be deleted.
For files, there are some other options.
The options must be used exclusively and determines if the file must be overwritten or skipped if it already exits.
If the file must be overwritten, an empty file is created and the old file is deleted.
If Skip and Overwrite are both not selected, the file will not be created/overwritten when the file does exist.