Closed Solved

Need help with basic batch file

Hello,
I just got a new PC that has Windows 7, am trying to make a batch file to back up "My Documents" to a thumbdrive the same way I did in XP but keep getting "Access Denied" message.

This line works fine- xcopy c:\"Users\John\Favorites" j:\ZT\"Users\John\Favorites"\ /e/s/d/y

but when I run- xcopy c:\"Users\John\My Documents" j:\ZT\"Users\John\My Documents"\ /e/s/d/y
I get "Access denied unable to create directory"


There is probably something simple that I'm missing but I don't see it.
Any help would be greatly appreciated.

Thanks,
John
7 answers Last reply Best Answer
More about need basic batch file
  1. Best answer
    In windows 7 "My Documents" is renamed to "Documents"

    so it would be C:\Users\John\Documents
  2. Thanks! You are absolutely right, that works like a champ. I don't understand why I see both "Documents" & "My Documents" listed in Win 7 but that doesn't matter as long as I have my backup. Thanks again!
  3. Well in the first post you have the quote marks in the wrong place, should be in front of the c:, but actually the quotes aren't needed in your example.
  4. Thanks for the input, it's working great now.
  5. No problem! Glad I was able to help :)
  6. Best answer selected by John72ok.
  7. This topic has been closed by Area51reopened
Ask a new question

Read More

Windows 7 My Documents Favorites Basic