Moving folder with same name as source file

Questions and answers on how to get the most out of FFAStrans
Post Reply
rholm
Posts: 27
Joined: Wed Jun 01, 2016 10:23 am

Moving folder with same name as source file

Post by rholm »

Edited out as below post is more accurate
Last edited by rholm on Wed Mar 20, 2019 12:59 pm, edited 1 time in total.
rholm
Posts: 27
Joined: Wed Jun 01, 2016 10:23 am

Re: Moving folder with same name as source file

Post by rholm »

Edited out as below post is more accurate
Last edited by rholm on Wed Mar 20, 2019 12:59 pm, edited 1 time in total.
rholm
Posts: 27
Joined: Wed Jun 01, 2016 10:23 am

Re: Moving folder with same name as source file

Post by rholm »

Edited out as below post is more accurate
Last edited by rholm on Wed Mar 20, 2019 1:00 pm, edited 1 time in total.
rholm
Posts: 27
Joined: Wed Jun 01, 2016 10:23 am

Re: Moving folder with same name as source file

Post by rholm »

Sorry, I am completely stuck again, and don't even know if my task will be possible. Have tried to explain a bit better below.
workflow.png
workflow.png (83.96 KiB) Viewed 6781 times
So I have one workflow with a condition which creates two paths. Path “A” works but I have problems with Path “B”. I will explain below


A1 – The incoming video is checked for certain criteria, the condition is met = node outcome is success

A2 – I have an executable that takes my incoming file and dashes it by command line. The executable creates a folder in the same as the source with the dashed content. The folder created by the executable has got the same name as the input video file.

A3 – I would like to move this folder to a location set earlier by a variable (%s_output%. I got this to work by using the following code: %comspec% /c "move "%s_original_drive%/%s_original_folder%/%s_original_name%" "%s_output%/%s_original_name%""

A4 – I move the original file to an archive, this works just fine.


All of the “A” workflow is functioning perfectly, the problem is when I add the transcoding!


B1 – Incoming video does not match criteria, the node is failing and sending to H.264 transcoding

B2 – While ffastrans is transcoding a temporary workfolder as well as file name is created

B3 – The executable Is working fine when using variable %s_source% in the commend line. It picks it up from the workfolder as expected. The problem is that the executable creates a folder with the dashed files in the temporary workfolder, and the name of that folder is the same as input file which means it is a GUID.

B4 – I don’t know how to move this folder in the temp, I can’t find it with code. Tried the following which obviously doesn’t work as it is looking at the original file name which is replaced by a GUID.
%comspec% /c "move "%s_job_work%/%s_original_name%" "%s_output%/%s_original_name%""
I have also tried the following which I hoped would work in both scenario A&B but still have the problem to pick up the folder with the GUID name
%comspec% /c "move "%s_source_dir%/% s_original_name%" "%s_output%/%s_original_name%""


I don't know if this is even possible but would like to ask for help again. Thanks in advance for any input!!!
emcodem
Posts: 1752
Joined: Wed Sep 19, 2018 8:11 am

Re: Moving folder with same name as source file

Post by emcodem »

Hey rholm,

it would be good if you upload your workflow xml. Also, just using %s_source% should do it. Is it possible that you just don't know that the %s_source% variable changes after each processor which created a new file? Explained here: viewtopic.php?f=5&t=849#p3550

cheers!
emcodem
emcodem, wrapping since 2009 you got the rhyme?
Post Reply