A new version of our FTP Script! software has been released today. It adds an optional parameter to all Upload and Download methods to specify what action should be taken after the file transfer.
The new property defaults to ofaNone, which means that no action will be taken: the file will simply be uploaded/downloaded and nothing else. But if you set the property to ofaDelete, then FTP Script! will automatically:
- delete any local file after uploading it
- delete any remote file after downloading it
Thanks to this new property you can write scripts like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
var Cli: TSFTPClient; begin Cli := TSFTPClient.Create; try Cli.ServerAddr := '127.0.0.1'; Cli.Username := 'test'; Cli.Password := 'test'; if Cli.Open then begin // upload all files from C:\Docs to /docs, then delete all original files from C:\Docs Cli.Upload('C:\Docs\*', '/docs/', true, feaOverwrite, ofaDelete); Cli.Close; end; finally Cli.Free; end; end. |
As usual you can download the new version from our web site. Thank you!