My goal is to convert some files with *.cdr extension to *.ai in a directory. The files look like file_a.cdr. file_b.cdr ...... I have replaced the convert.exe for you to another simple command like copy, so don't ask about the sense here in my example.
setlocal enableDelayedExpansion
for %%f in (*.cdr) do (
set "infile=%%f"
set "outfile=%%~nf.ai"
copy "%infile%" "%outfile%"
)
The output of the batch is always different!!!!
Sometimes it is:
copy "%file_a.cdr" "%file_a.ai" => system cannot find file
or
copy "" "" => system cannot find file
I have already used this syntax copy !infile! !outfile! with now success:
Thx in advance