General Discussion Need help? Have a problem? Let us help you. Bug reports and feature requests should be made using the Bug Tracker or Feature Tracker |
02-02-2011, 11:45 AM
|
#1
|
Junior Member
Join Date: Oct 2010
Posts: 24
|
Delete/Move Remote Files After Download
I am running FlashFXP version 4.0.0(build 1518), 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).
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
|
|
|
02-02-2011, 12:12 PM
|
#2
|
FlashFXP Developer
FlashFXP Administrator ioFTPD Beta Tester
Join Date: Oct 2001
Posts: 8,012
|
The only way would be to enqueue the deletion of the individual files instead of en-queuing the folder for deletion.
These functions do not provide wild-card support.
|
|
|
02-02-2011, 01:33 PM
|
#3
|
Junior Member
Join Date: Oct 2010
Posts: 24
|
Is there an automated way that I can do that? The source files have the date as part of the file name string, so the file names will be different every day.
|
|
|
02-03-2011, 09:06 AM
|
#4
|
FlashFXP Developer
FlashFXP Administrator ioFTPD Beta Tester
Join Date: Oct 2001
Posts: 8,012
|
Currently no, but this feature can probably be added to apply a pattern match on the filename.
The way I see this working is as an advanced feature of the queue item editor.
You enqueue a folder and then edit it via the item editor and it gives you a field to enter a file mask, if the mask is blank all files are deleted, if the mask contains say *.txt only files with a .txt extension such as flashfxp-todo-list.txt would be deleted.
Multiple masks could then be separated by using a semi-colon ; such as *.txt;*.log;access_*
What do you think?
|
|
|
02-03-2011, 12:21 PM
|
#5
|
Junior Member
Join Date: Oct 2010
Posts: 24
|
Quote:
Originally Posted by bigstar
Currently no, but this feature can probably be added to apply a pattern match on the filename.
The way I see this working is as an advanced feature of the queue item editor.
You enqueue a folder and then edit it via the item editor and it gives you a field to enter a file mask, if the mask is blank all files are deleted, if the mask contains say *.txt only files with a .txt extension such as flashfxp-todo-list.txt would be deleted.
Multiple masks could then be separated by using a semi-colon ; such as *.txt;*.log;access_*
What do you think?
|
Some additional ability to control file deletion in a custom way like this would be helpful. My problem is that I can't delete the remote directory, all of the files in the directory have a different name (because of a date string in the file name), and I don't know when the remote directory will be purged. I can set up a check to skip files if the time and date are the same between local and remote files, but then I have to leave the local files where they are. The ability to custom delete remotely would also save me the time and effort developing logic in my application to determine which files from the collection have to be processed, and the order they should be processed in.
|
|
|
02-03-2011, 07:21 PM
|
#6
|
FlashFXP Developer
FlashFXP Administrator ioFTPD Beta Tester
Join Date: Oct 2001
Posts: 8,012
|
So you want to delete all of the files, you just don't want to delete the actual folder?
Would it be possible to define a specific mask for the files you want to delete.
If you had for example folder: /Logs
File list
flashfxp.com-Dec-2010.gz
flashfxp.com-Jan-2011.gz
flashfxp.com-Feb-2011.gz
dummy.file
Enqueued the /Logs folder for delete
set a file mask to *.gz
FlashFXP wouldn't be able to delete the /Logs folder because it still contains "dummy.file"
The alternative would be to have an additional option that only deletes the content of the folder and not the actual folder.
Granted the ideal solution for this situation would probably be to eliminate the separate delete command and have an option to delete the file after transfer, although since you're queuing the folder, it would delete it as well.
hmm..
What if you had 3 queue commands
1. download the files
2. delete the folder
3. enqueue a raw command to re-create the folder? "MKD /DWExport"
Or what if the file permissions were set on the server to prevent deleting the DWExport folder.
I'll have to think about this a bit more.
|
|
|
02-04-2011, 09:36 AM
|
#7
|
Junior Member
Join Date: Oct 2010
Posts: 24
|
Quote:
Originally Posted by bigstar
So you want to delete all of the files, you just don't want to delete the actual folder?
Would it be possible to define a specific mask for the files you want to delete.
If you had for example folder: /Logs
File list
flashfxp.com-Dec-2010.gz
flashfxp.com-Jan-2011.gz
flashfxp.com-Feb-2011.gz
dummy.file
Enqueued the /Logs folder for delete
set a file mask to *.gz
FlashFXP wouldn't be able to delete the /Logs folder because it still contains "dummy.file"
The alternative would be to have an additional option that only deletes the content of the folder and not the actual folder.
Granted the ideal solution for this situation would probably be to eliminate the separate delete command and have an option to delete the file after transfer, although since you're queuing the folder, it would delete it as well.
hmm..
What if you had 3 queue commands
1. download the files
2. delete the folder
3. enqueue a raw command to re-create the folder? "MKD /DWExport"
Or what if the file permissions were set on the server to prevent deleting the DWExport folder.
I'll have to think about this a bit more.
|
In my case, deleting the folder is a security problem. I can delete files, but not the folder. The Log folder example is exactly what I had in mind. The flexibility to delete a named file or use a 'wildcard' in the way you've shown here, would be very helpful.
|
|
|
02-05-2011, 11:14 AM
|
#8
|
FlashFXP Developer
FlashFXP Administrator ioFTPD Beta Tester
Join Date: Oct 2001
Posts: 8,012
|
These features have been introduced in 4.0 build 1533 beta which is available via update check.
Enqueue Delete
Edit the item in your queue (right-click and select Edit)
You'll be able to define a file mask of the files you want deleted.
I also added a new option "include sub-folders", Typically delete operations are recursive but I can see some instances where you might want to limit the delete to the current folder content.
|
|
|
02-07-2011, 02:12 PM
|
#9
|
Junior Member
Join Date: Oct 2010
Posts: 24
|
Thanks for these updates!
cdun2
|
|
|
02-14-2011, 05:30 PM
|
#10
|
Junior Member
Join Date: Oct 2010
Posts: 24
|
I now have version 4.0.0 build 1535. Are the new features discussed here available in this build?
Thanks.
|
|
|
02-15-2011, 09:16 AM
|
#11
|
FlashFXP Developer
FlashFXP Administrator ioFTPD Beta Tester
Join Date: Oct 2001
Posts: 8,012
|
Yes the new features can be found in this update.
|
|
|
02-15-2011, 09:19 AM
|
#12
|
Junior Member
Join Date: Oct 2010
Posts: 24
|
How do I use them?
Thanks again.
cdun2
|
|
|
02-15-2011, 11:45 AM
|
#13
|
FlashFXP Developer
FlashFXP Administrator ioFTPD Beta Tester
Join Date: Oct 2001
Posts: 8,012
|
En-queue the delete operation
The delete operation will now appear in your queue window, right-click on it and select edit, you'll see a dialog similar to the one I've attached.
In my example I have it set to delete only *.log and *.gz files
|
|
|
03-11-2011, 03:38 AM
|
#14
|
Junior Member
Join Date: Jul 2006
Posts: 6
|
I think Im blind.
I got the version 4.0.0 (build 1545) with a Single User License.
If I put a file/folde in queue and edit it, I got no selection to delete the file/folder after transfer. (see attechment)
How can I get the selection ?
|
|
|
03-11-2011, 08:30 AM
|
#15
|
FlashFXP Developer
FlashFXP Administrator ioFTPD Beta Tester
Join Date: Oct 2001
Posts: 8,012
|
There are several different types of operations that can be queued.
File transfers
Delete
Move
Custom command
Each type has its own property editor.
You need to enqueue a delete operation in order to get the delete property editor.
On the remote file listing pane right-click and then its under Enqueue > Delete
|
|
|
Thread Tools |
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:07 AM.
|