I am trying to learn how to apply @perfile to run a multiple selected files (Apple.cbz, Banana.cbz as example).
From the info I found in Command modifier reference [Directory Opus Manual]
I am going to explain my problems
First example
echo 1 {file}
echo 2 {file}
When I run it, "Windows can't find "echo". Check this name is correct"
then for the rest of this article, I will change echo to @output
hope this is correct. New test:
@output 1 {file}
@output 2 {file}
The output I have is
1 Apple.cbz
1 Banana.cbz
2 Apple.cbz
2 Banana.cbz
That means each command is run with all the selected files before going to next one.
What I want is the full script applied to each file before begining with the next one.
The result I am looking is:
1 Apple.txt
2 Apple.txt
1 Banana.txt
2 Banana.txt
Then I modify the script including @perfile:begin and @perfile:end
I was using "area 2" as log for the execution (with shift + F5)
after your observation, I found "area 1" which is also called "script log" but show different messages than the previous one (as you can see in the image)
On the execution I find that all the lines begining with @ between @perfile:begin and @perfile:end are not executed. This is why I had to change @output command to =Output
Is this correct? How do I assign variables or use the @sync command?
I don't think we can see the code that you're running now, so it's hard to say what's wrong. The code we can see doesn't look like it uses @perfile or matches the output in the screenshots, unless I'm confused.
If you need all of variables, @perfile and @sync, I would change approach and use JScript here instead of basic commands/modifiers. It will make things easier.
(I'm not sure you'll actually need @sync when running 7z.exe, as I think it'll be synchronous by default.)