Batch command required.... (please)

  mattyc_92 15:08 25 Feb 2005

Hi, I am creating a new autorun menu for one of my many downloaded free tools cds....

I was wondering if anyone knows the .bat command for copying a WHOLE directory from cd to hard disk... e.g. I have, say 50 files in a directory and I want to copy ALL the files, while maintaining the subdirs (if any) and without having to copy each one individually...

Does anyone have any ideas?

  FelixTCat 15:18 25 Feb 2005


xcopy *.* /s

The /s means copy the contents of the subdirectories and maintain their structure.

  mattyc_92 15:24 25 Feb 2005

Thanks for the response...

So the command would be xcopy *my folder*/s c:\hello and this will copy a folder called my folder into the c:\hello directory??

  FelixTCat 15:39 25 Feb 2005

Very close; the /s comes last. The command would be:

xcopy X:\"my folder" C:\hallo /s

This will copy the contents of my folder and all its sub-directories into hallo.

  mattyc_92 15:40 25 Feb 2005

thanks... Will try that command now... back in abit...

  mattyc_92 15:57 25 Feb 2005

hasn't worked... All I get is the option "is it file or directory", I choose directory and then it just closes without doing anything...

  Yoda Knight 16:02 25 Feb 2005

did you create the directory u were copying to first ?

  mattyc_92 16:03 25 Feb 2005

no.... I want the bat file to make the directory itself.... I thought that this command did...

  FelixTCat 16:03 25 Feb 2005

What operating system are you using?

If XP, go to Start - Run and type cmd [Enter] Enter the instruction in the command window. Report back any error message.

Replace the X:\ in the command with the drive letter of your CD-ROM and there should be a space before the /s

  mattyc_92 16:10 25 Feb 2005

I am running WinXP Pro.... I was hoping that I can use the command in ANY drive (as I have 3 drives, i.e. 1 cd-rom, 1cd-rw and 1 dvd-rw)

  seedie 16:12 25 Feb 2005

I think xcopy d:\*.* c:\hello /s may work.

D: is your cdrom, if it's not d: then substitute.

If you want to get into this then xxcopy is the dogs, it's free and great for backups.


This thread is now locked and can not be replied to.

Elsewhere on IDG sites

AMD Radeon Adrenalin release date, new features, compatible graphics cards

Artist Pete Oswald on creating relatable characters & his new book

New iMac Pro release date, UK price & specs rumours

Idées cadeaux pour geeks et tech addicts