Batch file copy command in Windows 7

October 18, 2010 at 21:29:56
Specs: Windows 7, i5 / 4GB
Hello. I have question that I hope is so simple and silly that someone can answer it very easily. I had a batch file to copy documents to a memory stick that worked under XP. I just got a new laptop running Windows 7 and can't get the batch file to work. The problem is it can`t find the folder I want to copy - I think must be specifying the path wrong. I wrote the path as per the top of a Windows Explorer window.

The "bad" command is:

xcopy /s /i /D /Y "C:\users\pete\my documents\current working documents" "I:\Current Working Documents"

(Under XP the command was:

xcopy /s /i /D /Y "C:\Documents and settings\%USERNAME%\my documents\current working documents" "I:\Current Working Documents")

Thanks in advance.... Pete

See More: Batch file copy command in Windows 7

Report •

October 18, 2010 at 21:53:54
Do you get an error?

Life is too important to be taken seriously.


Report •

October 18, 2010 at 22:21:13
"%userprofile%\documents\current working documents"

How To Ask Questions The Smart Way

Report •

October 19, 2010 at 03:01:08
Thanks Mechanix and Razor. Using the %userprofile%\documents was the trick.

Once again thanks so much for taking the time to read and reply to my question, it's great that there are people like you around sharing your skills and knowledge with the rest of us.


Report •

Related Solutions

Ask Question