Batch File Or script Required
Results 1 to 5 of 5

Thread: Batch File Or script Required

  1. #1
    Join Date
    Mar 2003
    Posts
    38

    Batch File Or script Required

    Hello friends,
    I hv two folders on my windows xp c: drive both contain 50 to 60 same folders . Now i hv to create a batch file which will copy all files from each subfolder in each folder to a new folder such that it only copies the unique file from each folder to newly created folder.
    Example

    folder 1
    subfolder
    file1 file2


    folder 2
    subfolder
    file1 file3

    the new folder should be
    newfolder

    subfolder
    file1 file2 file3


    Any help will be highly appreciated..
    Last edited by healtheworld; May 20th, 2003 at 05:36 PM.

  2. #2
    Join Date
    Jun 2002
    Location
    Spokane, WA.
    Posts
    38
    http://forums.webdeveloper.com/

    I would go here and repost your question. They live for this kind of stuff.

  3. #3
    Join Date
    Jan 2000
    Posts
    557
    are these to main folders structures the same as far as subfolder names?

    I'm not sure if I real clear about what you're talking about but you could just try creating the new folder

    open folder one and select all and then copy
    right click the new folder select paste

    open folder two and select all and then copy
    right click the new folder select paste

    if you gonna do this all the time I could see making a batch file
    or if there is something more that I'm not understanding
    you could find more innuendo in the hardware forum than I put in that joke in the "lounge"

    Give me a break !

  4. #4
    Join Date
    Apr 2002
    Posts
    1,840
    if you gonna do this all the time I could see making a batch file
    or if there is something more that I'm not understanding
    healtheworld is looking for someone to do their homework.

  5. #5
    Join Date
    Feb 2000
    Location
    26.03°N 80.14°W
    Posts
    9,410
    Code:
    c:
    md\newfolder
    md\newfolder\subfolder
    xcopy "c:\folder 1\subfolder\*.*" c:\newfolder\subfolder
    cd "\folder 2\subfolder"
    for %x in (*.*) do if not exist "c:\newfolder\subfolder\%x" xcopy %x "c:\newfolder\subfolder"
    cd\
    dir c:\newfolder\subfolder
    Vernon Frazee, Microsoft MVP (Windows - Shell/User)

    Defenses Up!
    Tip: When prompted for a password, give an incorrect one first. A phishing site will accept it; a legitimate one won't.


    Inside Spyware: A Guide to Finding, Removing and Preventing Online Pests


    If you don't keep up with security fixes, your computer|network won't be yours for long.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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