Menu

#2 Include a prototype BAT file in the README.txt file

open
nobody
9
2017-08-22
2017-08-22
Cash Fields
No

In the readme.txt file it would be nice to add an example on how batch process a sub-dir. It took me a while to resharpen my dos bat skills.

Paste the following data into readme.txt file - to help the novice and and amyone else. DOS is old ; and a lost art.

======================================

This was my bat file:
go.bat

:: copy this BAT file into the sub-dir with the files to convert and the program 'img2pdf.exe'
:: clear the screen
cls
:: turn the echo off
echo off
:: next four lines of code
:: 'for' each file - the %%f will get the filenames that are .png
:: the do ( is the body of the loop
:: echo %%~nf will echo the filename no extension to the screen
:: turn the echo off again
:: execute the program img2pdf ; in landscape ; input the filename (%%f) ;
:: output the same name but with a pdf extension (.pdf)
for %%f in (
.png) do (
echo %%~nf
echo off
img2pdf -landscape "%%f" "%%~nf.pdf"
)

Thanks

Discussion


Log in to post a comment.

Monday.com Logo