Page 1 of 1

renaming output from a xml

Posted: Sat Jan 27, 2018 7:29 am
by rireamar
Congratulation for FFASTrans. I'm using it in a broadcast enviroment and I don't miss other expensive transco software! ;)
My scenario: I want to rename the processed file filenameID to filenameID_Theme. The Theme part comes from a xml filenameID.xml I process
whith xmlscarlet.
My last attemp was
1.use command to execute a .bat passing s_original_name as paremeter: %comspec% /c ""D:\input\xtractTheme.bat" "%s_original_name%""
2. xtractTheme.bat--> xml sel -N x="http://iptc.org/std/nar/2006-10-01/" -T -t -v "//x:slugline" %1.xml >Theme.txt

I'm stucked in this part-->Process exited with error code:3. No Theme.txt was created (the .bat is correct). I think the parameter %s_original_name% doesn't arrive :?:

3. The last part i was thinking to use is use the read() function at Theme.txt

I need a suggestion :idea: to achieve it or use other method
Thank you!

Re: renaming output from a xml

Posted: Sat Jan 27, 2018 12:03 pm
by admin
Hi rireamar, thank you for using FFAStrans and welcome to the forum! :-)

Can you please add the following line to a "Command executor"-node for testing purposes?
%comspec% /c "echo %s_original_name%> "%TEMP%\~output.txt""

When completed just open the %TEMP% folder in windows explorer and check if the ~output.txt file contains the desider variable. If it does, then everything is working in FFAStrans.

Just a hint, you should ALWAYS use absolute paths in your commands and scripts. And the reason is this: When FFAStrans executes a command, the default working directory is "%systemroot%\system32" so your command might actually try to put the Theme.txt file in that directory, which FFAStrans proably dont have write access to. So you need to specify exactly WHERE you want your Theme.xml file. Doing that might solve your problem. F.ex:
sel -N x="http://iptc.org/std/nar/2006-10-01/" -T -t -v "//x:slugline" %1.xml > "D:\My\XML\Folder\Theme.txt"

And remember to use "quotes" with file names;-) Hope this helps!

-steinar

Re: renaming output from a xml

Posted: Wed Feb 14, 2018 6:56 am
by rireamar
Thank you for your relpy, Steinar. The forum seemed to be offline and I decided to use a custom Java program to solve the issue. Anyway, thanks again for your excellent software and your attention.
Best regards!