Computing.Net > Forums > Programming > batch folder copying

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

batch folder copying

Reply to Message Icon

Original Message
Name: batchlover
Date: January 14, 2008 at 12:50:48 Pacific
Subject: batch folder copying
OS: xp 5.1.2600 sp2
CPU/Ram: pentium xeon 3.06GHz 2048
Model/Manufacturer: dell pws450
Comment:

another problem with my batch ramblings. i am trying to copy a directory and its subdirectories and files into another directory. what happens is, it only copies the files within the directories and not the actual structure. i have tried using the /? thing to find out a way but there is none listed that does the job. here is my code :
xcopy /h /r /k /x /y /t folder1 folder2

Batch is swift.... like a ninja! Be very afraid......


Report Offensive Message For Removal


Response Number 1
Name: IVO
Date: January 14, 2008 at 13:37:59 Pacific
Reply: (edit)

If you want structure only

xcopy /h /r /k /x /y /t /E folder1 folder2

If you want subdirectories with files

xcopy /h /r /k /x /y /S /E folder1 folder2


Report Offensive Follow Up For Removal

Response Number 2
Name: batchlover
Date: January 16, 2008 at 11:48:03 Pacific
Reply: (edit)

thank you IVO, but it still only copies the contents and not the structure in either case. :( any other suggestions?

Batch is swift.... like a ninja! Be very afraid......


Report Offensive Follow Up For Removal

Response Number 3
Name: IVO
Date: January 16, 2008 at 12:17:39 Pacific
Reply: (edit)

xcopy /h /r /k /x /y /S /E folder1\*.* folder2



Report Offensive Follow Up For Removal

Response Number 4
Name: batchlover
Date: January 19, 2008 at 18:46:36 Pacific
Reply: (edit)

THANKYOU! lol

Batch is swift.... like a ninja! Be very afraid......


Report Offensive Follow Up For Removal







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home








Do you own an iPhone?

Yes
No, but soon
No


View Results

Poll Finishes In 7 Days.
Discuss in The Lounge
Poll History




Data Recovery Software