Search found 2 matches

by TheDrake
06 Sep 2020 14:24
Forum: DOS Batch Forum
Topic: FOR doesn't iterate properly
Replies: 4
Views: 5809

Re: FOR doesn't iterate properly

@penpen, thank you, but I am aware of the echo feature; I meant that I never saw "DPI360" outputted on its own line.

@Eureka!, thank you; I was unaware of this part of DOS scripting!

@pieh-ejdsch, thank you, but it was the fact that I couldn't get "DPI360" to output that was the main issue.
by TheDrake
05 Sep 2020 21:45
Forum: DOS Batch Forum
Topic: FOR doesn't iterate properly
Replies: 4
Views: 5809

FOR doesn't iterate properly

Hi folks. I have a simple script which is in a directory that contains the files DPI360.pdf, DPI361.pdf and DPI362.pdf: FOR %G IN (*.pdf) DO ( SET newfile=%G SET dpi=%newfile:~0,6% echo %dpi% ) I don't understand why it outputs thusly (pasted into Windows XP's CMD): C:\printer>FOR %G IN (*.pdf) DO (...