I select TWO Files (09 and 10)
Running Script 1
1- Just copied with @perfile as you indicate : No output at all
2- Comenting @perfile: output
---SCRIPT INIT---
---SCRIPT INIT---
Hola Python's Bromas Saladas 09.cbr
Hola Python's Bromas Saladas 09.cbr
Hi Python's Bromas Saladas 09.cbr
Hi Python's Bromas Saladas 10.cbr
---FIN SCRIPT---
---FIN SCRIPT---
Now file OutputUC.ouc imported and run the second script
Running Script 2
1- Just copied with @perfile as you indicate: there is output
> OutputUC STRING="Salut Python's Bromas Saladas 09.cbr"
> OutputUC STRING="Salut Python's Bromas Saladas 10.cbr"
2- Comenting @perfile: output
---SCRIPT INIT---
---SCRIPT INIT---
Hola Python's Bromas Saladas 09.cbr
Hola Python's Bromas Saladas 09.cbr
Hi Python's Bromas Saladas 09.cbr
Hi Python's Bromas Saladas 10 - Especial Matrimonios!.cbr
> OutputUC STRING="Salut Python's Bromas Saladas 09.cbr"
> OutputUC STRING="Salut Python's Bromas Saladas 10 - Especial Matrimonios!.cbr"
---FIN SCRIPT---
---FIN SCRIPT---
Running Script 3
After viewing previous results I decided to test a thirs script using changing @output to OutputUC
@nofilenamequoting
@nodeselect
@perfile:begin
OutputUC ---SCRIPT INIT---
@set file_init={file$}
OutputUC Hola {$file_init}
OutputUC Hi {=file=}
=Output("Hello " + file)
OutputUC STRING="Salut {file$}"
OutputUC ---FIN SCRIPT---
@perfile:end
With @perfile : output is
> OutputUC ---SCRIPT INIT---
> OutputUC Hola
> OutputUC Hi Python's Bromas Saladas 09.cbr
> OutputUC STRING="Salut Python's Bromas Saladas 09.cbr"
> OutputUC ---FIN SCRIPT---
> OutputUC ---SCRIPT INIT---
> OutputUC Hola
> OutputUC Hi Python's Bromas Saladas 10.cbr
> OutputUC STRING="Salut Python's Bromas Saladas 10.cbr"
> OutputUC ---FIN SCRIPT---
With //@perfile: output is
> OutputUC ---SCRIPT INIT---
> OutputUC ---SCRIPT INIT---
> OutputUC Hola Python's Bromas Saladas 09.cbr
> OutputUC Hola Python's Bromas Saladas 09.cbr
> OutputUC Hi Python's Bromas Saladas 09.cbr
> OutputUC Hi Python's Bromas Saladas 10.cbr
> OutputUC STRING="Salut Python's Bromas Saladas 09.cbr"
> OutputUC STRING="Salut Python's Bromas Saladas 10.cbr"
> OutputUC ---FIN SCRIPT---
> OutputUC ---FIN SCRIPT---
OK. I understand now that
- before it wasnt the script with @perfile wan't running. Really it wasn't showing any output.
- you have found a way to substitute the @output command
Then I am going to include in the script some commands to see how it behave.
@nofilenamequoting
@nodeselect
@perfile:begin
OutputUC ---SCRIPT INIT---
@set file_init={file$}
@set extract_dir={sourcepath$}{file$|noext}
OutputUC Fichero {=file=}
OutputUC Directorio {=sourcepath=}{=file=}
//OutputUC Extract Dir {=extract_dir=}
//C:\USBTools\Utilities\7z.exe e -o"{extract_dir$}" "{file$}" -aou
C:\USBTools\Utilities\7z.exe e -o"n:\test\Extract" "{sourcepath$}{file$}" -aou
Delete "n:\test\Extract" RECURSE QUIET
OutputUC ---FIN SCRIPT---
@perfile:end
As you see I am not able tu use extract_dir variable it doesn't work.
If I uncomment
"//OutputUC Extract Dir {=extract_dir=}"
it stop working (no output, no effect on the diretories)
Then I fix some variable in order to see how it work
Running the script, senerate this output:
> OutputUC ---SCRIPT INIT---
> OutputUC Fichero TEST 09.cbr
> OutputUC Directorio N:\TEST\TEST 09.cbr
> C:\USBTools\Utilities\7z.exe e -o"n:\test\Extract" "N:\TEST\TEST 09.cbr" -aou
> Delete "n:\test\Extract" RECURSE QUIET
> OutputUC ---FIN SCRIPT---
> OutputUC ---SCRIPT INIT---
> OutputUC Fichero TEST 10.cbr
> OutputUC Directorio N:\TEST\TEST 10.cbr
> C:\USBTools\Utilities\7z.exe e -o"n:\test\Extract" "N:\TEST\TEST 10.cbr" -aou
> OutputUC ---FIN SCRIPT---
Then I see the function of @perfile is ok (which was the objevtive of this post)
Something I dont understand is why Delete command is not working (the directory remain between both files and later)
And I don't see Delete output for the second file.
Hope you can help me to solve all this "strange behaviour".
But thank you a lot for your suggestions which allow to progress on this issue.