PDA

View Full Version : Delete/Move Remote Files After Download


cdun2
02-02-2011, 11:45 AM
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

bigstar
02-02-2011, 12:12 PM
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.

cdun2
02-02-2011, 01:33 PM
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.

bigstar
02-03-2011, 09:06 AM
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?

cdun2
02-03-2011, 12:21 PM
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.

bigstar
02-03-2011, 07:21 PM
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.

cdun2
02-04-2011, 09:36 AM
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.

bigstar
02-05-2011, 11:14 AM
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.

cdun2
02-07-2011, 02:12 PM
Thanks for these updates!

cdun2

cdun2
02-14-2011, 05:30 PM
I now have version 4.0.0 build 1535. Are the new features discussed here available in this build?

Thanks.

bigstar
02-15-2011, 09:16 AM
Yes the new features can be found in this update.

cdun2
02-15-2011, 09:19 AM
How do I use them?

Thanks again.

cdun2

bigstar
02-15-2011, 11:45 AM
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

BalloS
03-11-2011, 03:38 AM
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 ?

bigstar
03-11-2011, 08:30 AM
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

BalloS
03-11-2011, 09:55 AM
ahh... Ok. I get it :D

But now another problem.


1 time in week I upload some files. How can I get it, that these files are deleted after transfer on my pc automaticlly but not on the remote ?



Ps.: Sorry for bad english, but Im from germany.

bigstar
03-11-2011, 03:04 PM
You'll need to manually delete these files, there is no method of automatic deleting files after transfer because there's no way to know 100% for sure if the files were transferred without corruption.

We've considered this as an option as part of the file transfer but we believe it might do more harm than good, when and if any corruption occurred, since the original file is deleted, there's no way to recover it.