|
-
Mar 17th, 2011, 06:21 AM
#11
Thread Starter
Fanatic Member
Re: [RESOLVED] Where to post DOS or Command line question?
Honeybee,
Thanks, I've had a quick look I've not been able to find what I'm looking for please forgive me if it's there and I'm not seeing it.
Here is a link to my post in General PC
This from the original question -
 Originally Posted by aconybeare
I've got a for loop in a batch file that loops ".jpg" files and I'd like to change it to find ".jpg" and ".pdf" files.
Is this possible?
Code:
SET counter=0
FOR /r "e:\test\myfiles\" %%X IN (*.jpg) DO (set /a counter+=1)
ECHO Copied %counter% of 5 file(s)
This is what I've managed to come up with -
 Originally Posted by aconybeare
As a workaround I've applied the following which works but I was hoping for a cleaner solution.
Code:
SET counter=0
FOR /r "e:\test\myfiles\" %%X IN (*.jpg) DO (set /a counter+=1)
FOR /r "e:\test\myfiles\" %%X IN (*.pdf) DO (set /a counter+=1)
ECHO Copied %counter% file(s)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|