Page 1 of 2

Repeating folder check

Posted: Tue Oct 30, 2018 1:48 pm
by dimwits86
Hi,

I've got a hopefully pretty simple 'mirror' workflow that I can't get to run more than once unless I choose the 'Reset' option. It's looking at MXF clips inside a folder and then checks for a clip of the same name in a remote location. If the file doesn't exist at the destination anymore, it gets deleted. The nodes go like this:

1. Folder, Accept files: *.MXF
2. Conditional: IF $exists("%S_MAMPATH%%s_original_name%.%s_original_ext%") is exactly like 0, then
3. Command executor - %comspec% /c "del /f /q "%s_original_full%""

Once I start it, it does it successfully the first time, but then because the files get cached, after the next sleep cycle they won't be checked again.

Is there a way to make it 'forget' the cache every time the workflow is completed?

Re: Repeating folder check

Posted: Tue Oct 30, 2018 4:20 pm
by admin
Hi dimwits86, thanks for using FFAStrans and welcome to the forum! :-)

Yes, you can fix this by checking the "Forget missing files"-option in the monitor.

Hope this helps.

-steinar

Re: Repeating folder check

Posted: Tue Oct 30, 2018 4:39 pm
by dimwits86
Hi admin,

Unfortunately it's not working :-(

Would 'forget missing files' even help in this situation? Basically what I want it to do is to look at R:\Foo\BAR.MXF and if Q:\Foo\BAR.MXF exists then move on, if Q:\Foo\BAR.MXF is gone then delete R:\Foo\BAR.MXF as well. Rinse and repeat.

The problem at the moment is that it's only doing it once. Once it's decided that R:\Foo\BAR.MXF exists in both places it ignores it forever, even with the 'missing files' option turned on. So if I do get rid of Q:\Foo\BAR.MXF eventually, the workflow doesn't know that since the file is already cached.

Essentially what I'm looking for is a way to get the Folder node to stop ignoring files it's already looked at, without having to take them out of the folder and put them back in, which is what 'forget missing files' would force me to do.

Re: Repeating folder check

Posted: Tue Oct 30, 2018 4:57 pm
by admin
Ah, I'm sorry! I misread the issue :-(

Try and add another "Command executor"-node with the following command:

%comspec% /c "if exist "%s_cache_record%" del /f /q "%s_cache_record%""

This will remove the cache record. It's just a file really :-)

Hope this works as expected.

-steinar

Re: Repeating folder check

Posted: Tue Oct 30, 2018 5:31 pm
by dimwits86
Thank you so much for this! :-)

Does it delete the cache for all workflows? Or just for the one that the node is in?

Re: Repeating folder check

Posted: Tue Oct 30, 2018 7:05 pm
by admin
The record "belongs" to the specific job and the monitor that picked it up. It has no relevans for other workflows, nodes or jobs.

-steinar

Re: Repeating folder check

Posted: Wed Oct 31, 2018 9:06 am
by dimwits86
Awesome :-) I think it's fixed now! Thanks!

Re: Repeating folder check

Posted: Mon Aug 10, 2020 5:39 am
by gshcarter
admin wrote: Tue Oct 30, 2018 4:57 pm Ah, I'm sorry! I misread the issue :-(

Try and add another "Command executor"-node with the following command:

%comspec% /c "if exist "%s_cache_record%" del /f /q "%s_cache_record%""

This will remove the cache record. It's just a file really :-)

Hope this works as expected.

-steinar
Sorry to dredge this up but this is exactly what I'm trying to do on my Windows 10 Pro machine. Unfortunately I get an "Access Denied" response when running that command with Command Executor.

The path %s_cache_record% refers to resides in "C:\Program Files\FFAStrans\Processors\db\cache\jobs" and is owned by the same user running the program and services with full access privileges. I can only think perhaps the location is locked while the job is active which presents a bit of a paradox...

Thanks in advance for any advice you may be able to provide.

George.

Re: Repeating folder check

Posted: Mon Aug 10, 2020 7:49 am
by ThomasM
Hi George,

I also ran into problems having FFAStrans in the "C:\programs"-folder for some reasons:

- Checking for Virus
- Access denied...

I think it is more easy to have FFAStrans in an extra-folder somewhere on "C:\MyFavouriteFFAStransFolder" and exclude it from virus-scan. Then it should be no problem deleting the files in question. Another workaround could be running FFAStrans with Admin-Rights. This helped me on my private machine.

just my two cents...
regards
tom

Re: Repeating folder check

Posted: Mon Aug 10, 2020 11:38 am
by emcodem
Hey @gshcarter, welcome to the forum and thank you for using ffastrans!

Thomas is right, moving the complete ffastrans folder out of "program files" directory is pretty sure one solution. We also recommend using c:\FFAstrans as install directory in our install guide: http://www.ffastrans.com/wiki/doku.php? ... stallation

Most likely it is the UAC which requires elevation for deleting files in "program files" directory, so you can alternatively e.g. disable UAC completely:
https://winaero.com/blog/how-to-turn-of ... indows-10/

Please let us know if you can live with any of the solutions, if not we will find the best way for you...