English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have tried to create a batch file that will copy my docs to an external hard drive and it doesn't work. Here is what I have.

@echo off
xcopy C:\Documents and Settings\Jay\My Documents E:\My DOcs Backup

I also tried to create a batch so I can delete my cookies and temp files, but that doesn't work either.

del C:\Documents and Settings\Jay\Local Settings\Temp\*.*
del C:\Documents and Settings\Jay\Local Settings\Temporary Internet Files\*.*
del C:\Documents and Settings\Jay\Cookies\*.*

I have looked on numerous websites to see if I had the correct syntax and everything looks good, maybe I missed something. The only thing that happens is when I double click on the .bat icon it just flashs once and nothing happens

Please help

2007-09-25 04:53:53 · 2 answers · asked by Jason 1 in Computers & Internet Software

2 answers

The "problem" here is your path has spaces in them, which means you need to put them "in quotes", like

xcopy "c:\documents and settings\Jay\My Documents" "e:\My docs backup"

DOS commands don't like spaces... they thought it's separate commands, unless you put them in quotes.

2007-09-25 05:14:08 · answer #1 · answered by Kasey C 7 · 0 0

your copy statement is wrong it needs to be like so

xcopy C:\Documents and Settings\Jay\My Documents\* E:\My DOcs Backup /s /i

the s coppies all sub folders and the i defines the destination as a folder



(is My DOcs Backup spelt right also as you may want to check correct spellings of folder)

2007-09-25 05:06:27 · answer #2 · answered by markblue777 1 · 0 1

fedest.com, questions and answers