Move and delete Files

Questions and answers on how to get the most out of FFAStrans
Post Reply
JanBob
Posts: 5
Joined: Fri Mar 08, 2024 12:45 pm

Move and delete Files

Post by JanBob »

Hello everybody!

I am looking for a workflow that moves video files based on a date at the beginning of the file name 24 hours after the date and deletes them after two weeks.

All video files are in one watchfolder.
All video files have a date at the beginning in the form DD.MM.[Blank][Title].mp4

Example: There are four video files with "11.03. [Name].mp4". On 12 March, all four video files are to be moved to the "Ready" subfolder.
On 26 March, i.e. two weeks later, these four video files are to be deleted from "Ready".

Unfortunately, I can't use the creation date as a variable because some of the video files were completed weeks before.

How can I read and pass "our" date as a variable? Do you have any tips for me?
JanBob
Posts: 5
Joined: Fri Mar 08, 2024 12:45 pm

Re: Move and delete Files

Post by JanBob »

I have asked ChatGPT to write me a script that performs the operation. Now I can simply execute the script with a Command Executor Processor. That should work. But let me know if you have a more elegant solution.
emcodem
Posts: 1646
Joined: Wed Sep 19, 2018 8:11 am

Re: Move and delete Files

Post by emcodem »

Hi JanBob,

welcome to the Forum and Thank you for using FFAStrans :D

If you can live with the script and it works for you, there is no need to search for another solution.
You could work with a webinterface scheduled job, files find plugin processor and a commandline move/delete but overall it might be a more complex solution than a small script.

You should however take very good care about understanding the deletion solution, automated deletion should apply some additional checks before executing deletion because one wrong variable like wrong directory can often easily cause huge and painful data loss.
emcodem, wrapping since 2009 you got the rhyme?
JanBob
Posts: 5
Joined: Fri Mar 08, 2024 12:45 pm

Re: Move and delete Files

Post by JanBob »

Hi emcodem,
thanks for the warm welcome! I stumbled across your supertool when I was looking for ways to have Whisper automatically transcribe video files. Now it opens up a whole world of other possibilities that we can use to make our daily work easier!
And thanks for the warning to take a closer look at the deletion process before we use it! ;)

I do have one question though: The command executor on its own apparently does nothing. How can I get it to run once a day?
emcodem
Posts: 1646
Joined: Wed Sep 19, 2018 8:11 am

Re: Move and delete Files

Post by emcodem »

Hehe yeah whisper is a huge topic at least for steinar and mee too, steinar also was happy to see that purfview mentions ffastrans on his github, we are not often mentioned anywhere :D Hope you enjoy building workflows with ffastrans!

Regarding "command executor does nothing": yes exactly, you always need to find some way to start jobs. FFastrans on it's own does not yet have a feature to fully automatically start jobs without watchfolders but i added a feature called "scheduled jobs" to the webinterface. It will kick off workflows or better jobs in a specific frequency (like windows task scheduler). It should be easy to find and also easy to use (just add a scheduled job, configure target workflow and set frequency).
Let me know if you need help with that...
emcodem, wrapping since 2009 you got the rhyme?
JanBob
Posts: 5
Joined: Fri Mar 08, 2024 12:45 pm

Re: Move and delete Files

Post by JanBob »

That's exactly how I found you, via the mention of purfview on github. :)

I haven't used the web interface yet, but I will have a look and test it. I'll get back to you if I need any help. Thanks a lot!
emcodem
Posts: 1646
Joined: Wed Sep 19, 2018 8:11 am

Re: Move and delete Files

Post by emcodem »

8-)
emcodem, wrapping since 2009 you got the rhyme?
JanBob
Posts: 5
Joined: Fri Mar 08, 2024 12:45 pm

Re: Move and delete Files

Post by JanBob »

Fantastic work! Easy to find, easy setup, runs as desired! Thanks for your help! :)
Post Reply