+ Post New Thread
Results 1 to 2 of 2
Scripts Thread, Batch DO command for X Folders in Coding and Web Development; Lets say we have D:\ with folders named: A B C D etc... (to Z) I want to CD into ...
  1. #1

    Join Date
    Nov 2011
    Location
    Winchester
    Posts
    22
    Thank Post
    1
    Thanked 2 Times in 2 Posts
    Rep Power
    6

    Smile Batch DO command for X Folders

    Lets say we have D:\ with folders named:
    A
    B
    C
    D
    etc... (to Z)

    I want to CD into folder A THEN xcopy subfolder1 here, xcopy subfolder2 there, copy Folder A flat root content files somewhere else, THEN CD.. THEN Move to folder B
    The process will then start again, until all folders have been completed.

    I think i need to use a FOR /D

    Research =
    Batch for loops - Judago's scripts / console stuff
    for /d - Loop through directory | SS64.com


    Any help would be amazing !

  2. #2

    Join Date
    Nov 2011
    Location
    Winchester
    Posts
    22
    Thank Post
    1
    Thanked 2 Times in 2 Posts
    Rep Power
    6
    Think i have it...

    cd d:\
    for /d %%A in (*) do (
    cd %%A
    "Hello" > test.txt
    cd \
    )

    thanks anyway !

SHARE:
+ Post New Thread

Similar Threads

  1. Should I use iSCSI for home folders?
    By johnnyTechy in forum Hardware
    Replies: 4
    Last Post: 12th January 2009, 05:05 PM
  2. Checking student's work areas for missing folders
    By SimonWindisch in forum How do you do....it?
    Replies: 0
    Last Post: 4th September 2008, 06:03 PM
  3. Replies: 19
    Last Post: 21st April 2008, 10:53 AM
  4. Do it for the children
    By alexknight in forum Other Stuff
    Replies: 0
    Last Post: 22nd May 2007, 08:42 AM
  5. Replies: 2
    Last Post: 11th October 2006, 12:17 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •