simple batch file

  Chrissib 21:23 05 Jul 2009

Hi, having lost my rank and multiplayer details a number of times, I am trying to write a batch file to copy the player data to a backup directory, but each time I try, I get an error, either file not found or invalid number of parameters...

I am writing a batch file to use 'xcopy', with source directory 'c:\path\players' to destination 'c:\path\backup\players'

expecting all files in the source 'players' directory to be written to the 'backup\players' directory. But when I run the batch file, I get the errors above.

Can anyone suggest the correct syntax please.

  Eric10 21:59 05 Jul 2009

xcopy c:\path\players\*.* c:\path\backup\players /Y

The /Y switch overwrites files in the destination folder without prompting for permission.

If there are spaces in either of the paths you may need to enclose them in quotes:

xcopy "c:\path to folder\players\*.*" "c:\path to folder\backup\players" /Y

  robin_x 02:45 06 Jul 2009

For any old "DOS" command /? lists syntax, switches and parameters.

eg xcopy /?

My XP Home and I suspect all later OS do not support some of my old favourites or support for some switches is removed.

I found there seem to be lots of 3rd party utils to help out though.

Just found "xxcopy" via Google. Havent worked out what I might need it for yet though.

  DieSse 13:07 06 Jul 2009

"Haven't worked out what I might need it for yet though."

xxcopy is a replacement for xcopy - but it doesn't suffer from a fatal flaw that's in xcopy under certain circumstances. See the xxcopy site for a description of the flaw.

With xcopy, always use the /E switch if there are subdirectories that may need to be copied too.

  Chrissib 13:23 06 Jul 2009

Thanks for the responses. The filepath up to the 'players' directory is very long, but there are sub directories after the 'players directory, that I want to include.

eg. C:\~~~\players\profiles\mods\old.... with files in some of them. will the command copy, and keep all the sub-directories identical?

  Rigga 13:47 06 Jul 2009

Use /Y and /E switches.


  Chrissib 14:53 06 Jul 2009


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

Elsewhere on IDG sites

Alienware 17 R4 2017 review

Illustrator Sylvain Tegroeg created thousands of intricate line drawings for the mobile game…

Best iPad buying guide 2017

Comment télécharger une application indisponible en France ?