PDA

View Full Version : Deleting Multiple Remote Files


cdun2
06-30-2011, 10:24 AM
I am running FlashFXP version 4.0.0(build 1548), single user license. This is on Windows Server 2008 R2 Enterprise

I have a queue file that downloads a remote directory called DWExport (and whatever files are in it) to a local directory called Refresh. Once the Directory and its files have been downloaded succesfully, I want to delete any files that are in that remote directory. I don't see how to do that without deleting the entire remote directory (using Enqueue on the remote directory).

A sample of one of the file names is; SmartExport_DW2011.06.30.zip. The only thing that changes about the file name is the datestamp. The remote directory is /OurCompany/DWExport/.

If I Enqueue the deletion, is there a way to use a wildcard to delete/move the contents of the remote DWExport directory instead of deleting the entire directory?

Thank you for your help!

cdun2

bigstar
06-30-2011, 06:42 PM
This requires FlashFXP v4.1 build 1902 or newer.

With the latest beta release this can be done with additional configuration of the queued delete.

Load the queue file, then from within the queue window right-click on the folder to be deleted and select edit. From the edit dialog uncheck Include sub-folders click OK and then save your modified queue file.

When the option include sub-folders is unchecked the folders within will not be deleted and neither will the folder, only the files will be deleted.

Download FlashFXP 4.1 beta (https://oss.azurewebsites.net/download-beta)



Another new feature in the 4.1 beta is the ability to define file masks for folder delete operations, so you could then enter a file mask of SmartExport_DW*.zip and only the matching files within the folder would be deleted.

computersoftware121
08-08-2011, 12:51 PM
Thanks for pointing that out, although in the actual code it does have the correct number of backslashes. This appears to be an issue directly related to VB trying to delete files using a UNC connection. If I call a batch file it works normally, but I am trying to avoid having to use a batch file so I can deploy this to other sites as well.