Results 1 to 11 of 11

Thread: [RESOLVED] Where to post DOS or Command line question?

  1. #1

    Thread Starter
    Fanatic Member aconybeare's Avatar
    Join Date
    Oct 2001
    Location
    UK
    Posts
    772

    Resolved [RESOLVED] Where to post DOS or Command line question?

    Hi,

    I have a question about using a For Loop in a cmd file can anyone advise me which forum would be best to post it in?

    Cheers Al

  2. #2
    Frenzied Member
    Join Date
    Jan 2010
    Location
    Connecticut
    Posts
    1,687

    Re: Where to post DOS or Command line question?

    What's a cmd file?
    VB6 Library

    If I helped you then please help me and rate my post!
    If you solved your problem, then please mark the post resolved

  3. #3
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: Where to post DOS or Command line question?

    I guess General PC would be the most appropriate location.
    Delete it. They just clutter threads anyway.

  4. #4
    Fanatic Member
    Join Date
    Aug 2009
    Posts
    540

    Re: Where to post DOS or Command line question?

    I believe he's talking about batch files.
    Where I'm from we only have one bit of advice for new comers: "If you hear banjos, turn and run".


    VS 2008 .NetFW 2.0

  5. #5

    Thread Starter
    Fanatic Member aconybeare's Avatar
    Join Date
    Oct 2001
    Location
    UK
    Posts
    772

    Re: Where to post DOS or Command line question?

    Hi,

    Thanks for all your replies.

    Yes I'm talking about batch files .bat or .cmd

    TheBigB: Thanks I'll try posting it there.

    Cheers Al

  6. #6
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Where to post DOS or Command line question?

    Or find a box jocky (TechNet) site instead of a programming (MSDN) site.

  7. #7
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Where to post DOS or Command line question?

    Quote Originally Posted by TheBigB View Post
    I guess General PC would be the most appropriate location.
    Same here.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  8. #8
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Re: Where to post DOS or Command line question?

    Well, I had the same problem a few weeks ago but Google helped me out. I think if the OP searches the net, he should find enough samples so that he doesn't have to post anywhere.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  9. #9

    Thread Starter
    Fanatic Member aconybeare's Avatar
    Join Date
    Oct 2001
    Location
    UK
    Posts
    772

    Re: Where to post DOS or Command line question?

    Dilettant; I'm going to have a hunt around for a technet forum to join for any future command line conundrums.

    HoneyBee; I searched on google first but didn't find what I was looking for, which is why I decided to post here which is my preferred portal for all things programming.

    Thanks to everyone who's responded.

    Cheers Al

  10. #10
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Re: [RESOLVED] Where to post DOS or Command line question?

    Here's the search result from google for "Using FOR loop in Windows Batch Files"

    Just see if what you are searching for isn't there already. My hunch is unless it's something out of the ordinary, it should be there.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  11. #11

    Thread Starter
    Fanatic Member aconybeare's Avatar
    Join Date
    Oct 2001
    Location
    UK
    Posts
    772

    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 -

    Quote Originally Posted by aconybeare View Post
    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 -

    Quote Originally Posted by aconybeare View Post
    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
  •  



Click Here to Expand Forum to Full Width