Answer the question
In order to leave comments, you need to log in
How to make unique output names using BAT?
Hello, there is a script:
chcp 1251
set CurPath=%cd%
cd C:\Program Files\Crypto Pro\CSP
call csptest -sfsign -sign -in %CurPath%\delo.pdf -out %CurPath%\delo.pdf.sig -my Primakov AA
cd %CurPath%
As you can see, the script for one file is specified explicitly. Please, tell me what should I use, so that the script would be executed for all pdf files in the folder and their names with the pdf.sig extension would be saved on the output?
Answer the question
In order to leave comments, you need to log in
Instead of a parameter in the batch file, write %1 %2
for /f "delims=" %%F in ('dir *.pdf /AD /TW /B') do call a.bat %%F
Place your script in the batch file and replace \ delo.pdf - %1 as parameter
for /f "delims=" %%F in ('dir *.pdf /AD /TW /B') - loop through parsing list of files.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question