Go Back   FlashFXP Forums > >

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

Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 02-02-2011, 11:45 AM   #1
cdun2
Junior Member
 
Join Date: Oct 2010
Posts: 24
Question 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
cdun2 is offline  
Old 02-02-2011, 12:12 PM   #2
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

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.
bigstar is offline  
Old 02-02-2011, 01:33 PM   #3
cdun2
Junior Member
 
Join Date: Oct 2010
Posts: 24
Default

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.
cdun2 is offline  
Old 02-03-2011, 09:06 AM   #4
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

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?
bigstar is offline  
Old 02-03-2011, 12:21 PM   #5
cdun2
Junior Member
 
Join Date: Oct 2010
Posts: 24
Default

Quote:
Originally Posted by bigstar View Post
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.
cdun2 is offline  
Old 02-03-2011, 07:21 PM   #6
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

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.
bigstar is offline  
Old 02-04-2011, 09:36 AM   #7
cdun2
Junior Member
 
Join Date: Oct 2010
Posts: 24
Default

Quote:
Originally Posted by bigstar View Post
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.
cdun2 is offline  
Old 02-05-2011, 11:14 AM   #8
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

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.
bigstar is offline  
Old 02-07-2011, 02:12 PM   #9
cdun2
Junior Member
 
Join Date: Oct 2010
Posts: 24
Default

Thanks for these updates!

cdun2
cdun2 is offline  
Old 02-14-2011, 05:30 PM   #10
cdun2
Junior Member
 
Join Date: Oct 2010
Posts: 24
Default

I now have version 4.0.0 build 1535. Are the new features discussed here available in this build?

Thanks.
cdun2 is offline  
Old 02-15-2011, 09:16 AM   #11
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

Yes the new features can be found in this update.
bigstar is offline  
Old 02-15-2011, 09:19 AM   #12
cdun2
Junior Member
 
Join Date: Oct 2010
Posts: 24
Default

How do I use them?

Thanks again.

cdun2
cdun2 is offline  
Old 02-15-2011, 11:45 AM   #13
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

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
Attached Thumbnails
Delete/Move Remote Files After Download-queue_edit_enqueue_delete-png  
bigstar is offline  
Old 03-11-2011, 03:38 AM   #14
BalloS
Junior Member
 
Join Date: Jul 2006
Posts: 6
Default

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 ?
Attached Images
File Type: gif fileupload.gif (13.7 KB, 6 views)
BalloS is offline  
Old 03-11-2011, 08:30 AM   #15
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

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
bigstar is offline  
Closed Thread

Tags
directory, download, files, flashfxp, remote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:43 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)