Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. quick cmd prompt question

quick cmd prompt question

Scheduled Pinned Locked Moved C / C++ / MFC
question
7 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    keegan
    wrote on last edited by
    #1

    Ok, this is bugging me. Say i have this dir:

    test
    folder1
    hello
    goodbye
    folder2
    hello
    goodbye

    Those are all folders. Now, say i want to delete all folders called 'hello'. How would i do this? I tried piping a dir command into the del command: dir /A: D /s hello | del but that didnt work. any one got a tip? *.* cin >> knowledge;

    R A 2 Replies Last reply
    0
    • K keegan

      Ok, this is bugging me. Say i have this dir:

      test
      folder1
      hello
      goodbye
      folder2
      hello
      goodbye

      Those are all folders. Now, say i want to delete all folders called 'hello'. How would i do this? I tried piping a dir command into the del command: dir /A: D /s hello | del but that didnt work. any one got a tip? *.* cin >> knowledge;

      R Offline
      R Offline
      Ranjan Banerji
      wrote on last edited by
      #2

      try piping it to a rmdir command. I have not tried it myself. :-)

      K 1 Reply Last reply
      0
      • R Ranjan Banerji

        try piping it to a rmdir command. I have not tried it myself. :-)

        K Offline
        K Offline
        keegan
        wrote on last edited by
        #3

        it said the syntax was incorrect :( *.* cin >> knowledge;

        R 1 Reply Last reply
        0
        • K keegan

          Ok, this is bugging me. Say i have this dir:

          test
          folder1
          hello
          goodbye
          folder2
          hello
          goodbye

          Those are all folders. Now, say i want to delete all folders called 'hello'. How would i do this? I tried piping a dir command into the del command: dir /A: D /s hello | del but that didnt work. any one got a tip? *.* cin >> knowledge;

          A Offline
          A Offline
          Anonymous
          wrote on last edited by
          #4

          i don't think you can do that in ms-dos.

          K 1 Reply Last reply
          0
          • K keegan

            it said the syntax was incorrect :( *.* cin >> knowledge;

            R Offline
            R Offline
            Randhir Sinha
            wrote on last edited by
            #5

            This will work. for /R %i in (hello) DO rd %i If you are new to DOS, believe it or not, it is a DOS command.:)

            S 1 Reply Last reply
            0
            • R Randhir Sinha

              This will work. for /R %i in (hello) DO rd %i If you are new to DOS, believe it or not, it is a DOS command.:)

              S Offline
              S Offline
              Steve S
              wrote on last edited by
              #6

              I thought /R was an NT CMD.EXE thing... Steve S

              1 Reply Last reply
              0
              • A Anonymous

                i don't think you can do that in ms-dos.

                K Offline
                K Offline
                keegan
                wrote on last edited by
                #7

                well, im using XP's cmd.exe, and im still not having any luck. :-/ *.* cin >> knowledge;

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups