PDA

View Full Version : Delete older files - schedule


colink
04-11-2017, 07:18 AM
I have read this thread about using raw commands to delete files >than 30 days
https://oss.azurewebsites.net/forum/flashfxp/custom-commands/16357-delete-files-date.html

I have managed to delete current folder and sub folders with following raw command - but this is not what I want
/select -f :age+30d
/delete selected

I want to set a schedule to delete all files older than 30 days in a specific folder
See attachment for my folder structure (details copied below)
Folder structure on my server
/opt/screenvideo1/html/media/upp/ Current folder
folder in window that I want to delete = up-test

Raw command I tries (plus variations of this)
/cd /up-test
/select -f :age+30d
/delete selected

Various attempts all result in [No Such Files]

=====
Query 2
When I get the correct syntax working, how do I save this command and add to a schedule?

=====
Query 3 - I recognise the CD command from DOS, this depends on the parent folder already open.
If I do manage to get the correct syntax for this delete, do I always have to be in the same parent folder when the scheduled event runs or is there a way to use this command so it always finds the correct folder form the root folder I am logged into?

Query 4
How / where do I delete my test RAW commands (see screenshot)

bigstar
04-11-2017, 09:52 AM
1.
The reason you get the error "no such files" is because in this case you need to use the absolute path when using the /cd macro.


/cd /opt/screen-video1/html/media/upp/up-test/
/select -f :age+30d
/delete selected
2.
Right-click on the file list and from the popup menu select Enqueue > Raw Command
Now enter your commands.
Now save the queue to a file. From the main menu > Queue > Save As

3.
This is why its important to use the full absolute path with the /cd command.

4.
If you right-click on the raw command text input box there is an option "Clear history".
I believe that the raw command history is not saved on exit, so the next time you start FlashFXP the history should be empty.