PDA

View Full Version : Delete local files by date


Shark
04-03-2015, 01:07 AM
I tried to post in my original thread; https://oss.azurewebsites.net/forum/flashfxp/custom-commands/16357-delete-files-date.html

However, for some reason I cannot unlock it, my access must have changed.

Anyway, can this same method be applied to local file browser, so I can delete network files by date?

bigstar
04-03-2015, 04:07 PM
Yes, this can work in the local browser as well

Shark
04-03-2015, 05:32 PM
Yes, this can work in the local browser as well

I've tried adding the command. Unfortunately it just executes it straight away and doesn't add it to the queue. So there is no way of saving it...

Am I doing it wrong?

bigstar
04-04-2015, 07:27 AM
To saw a command sequence to a queue you can do it a couple different ways.

It's best to do this while not connected any remote site since that connection link will be restored when the local command is performed.

Select the local browser file list pane, right-click and then from the popup menu Enqueue > Raw Command

https://oss.azurewebsites.net/images/forum/flashfxp-enqueue-raw-command.png


Raw command prompt

And enter the commands.. such as..
/cd c:\folder\you\want\to\delete\from
/select -f :age+30d
/delete selected
https://oss.azurewebsites.net/images/forum/flashfxp-enqueue-raw-command-prompt.png


Click the [OK] button and now these 3 lines will appear as a single entry in the queue.



https://oss.azurewebsites.net/images/forum/flashfxp-queue-commands.png

It's best to group the commands like this into a single queue entry.

This way if the /cd operation fails the commands that follow it are not executed.

[UPDATE]
Updated example and images to show a local path c:\folder\you\want\to\delete\from (code was copied from original example that was for a remote server)

If you wanted to test this command out to make sure it works as expected without deleting anything you can add the /stop command after the /delete selected

/cd c:\folder\you\want\to\delete\from
/select -f :age+30d
/delete selected
/stop

Shark
04-04-2015, 08:08 AM
Great, it appears the right click method is adding to the queue rather than the menu way which just executes it straight away.

The only question left is will the /cd command work correctly if it is a network share?

Ie.

cd \\HDD-SERVER\Backup\
/select -f :age+30d
/delete selected

Shark
04-04-2015, 05:51 PM
[08:50:40] Command not supported: cd \\HDD-SERVER\Backup\
[08:51:10] Command not supported: cd/ \\HDD-SERVER\Backup\

DayCuts
04-04-2015, 07:58 PM
Did you try "/cd"? Your log lines show only "cd" and "cd/" which are not valid commands.

Shark
04-04-2015, 08:05 PM
ha... I must be dyslexic. Thanks

Shark
04-04-2015, 08:06 PM
The only problem with the right click on the local browser is that I cannot untick "Display results in a edit window"

How can I turn off the pop-up window?

DayCuts
04-04-2015, 08:49 PM
That is odd, I am unable to tick it, but you are unable to untick it?

Shark
04-05-2015, 12:10 AM
I think that is what I said... I cannot untick it

bigstar
04-05-2015, 07:59 AM
There was an odd mistake where the "Display results in edit window" was pulling a default value from some totally unrelated setting.

This update should correct it, ffxp5.1.0.3827.zip
(https://oss.azurewebsites.net/testr/dev-builds/ffxp5.1.0.3827.zip)

This is just the flashfxp.exe so just unzip it into your FlashFXP program folder.

Shark
04-05-2015, 05:27 PM
Thanks bigstar. That is fixed it for me. Now the box is unticked. However, it cannot be ticked either (which is fine for me) and is greyed out.

Shark
04-05-2015, 05:48 PM
Just to complete the thread, I have tried it and it works fine now. Here is what I have done for the command & in Task Scheduler:

- Go to local browser, right-click and then from the popup menu Enqueue > Raw Command. Then press the arrow & enter these lines:

/cd \\HDD-SERVER\Backup\
/select -f :age+30d
/delete selected

- Right click in queue window & save the queue.

- Load Windows Task Scheduler & create a new basic task. Run FlashFXP as a program and use these arguments:

-c2 -go deletefiles.fqf

It all appears to be working now. Thanks.