Copy IE Favorites Dir using batch/cmd to mapped drive?

M

Mike

I need to create a .bat or .cmd file that users can run to
copy their IE favorites to a mapped network drive. All
attempts thus far are not successfult. From the command
line I can run the script and it works just fine, but if I
careate a .txt, rename it with a .bat or .cmd, it does not
work. I receive an error message stating that "The system
cannot find the path specified.
File not found - Favorites". Can someone help me with
this please ASAP?
Thanks,
Mike V.
 
H

Heath

Try this


@echo off
cd /d c:\
cd %userprofile%
xcopy favorites /h /s /y (drive:path)
cls
exit
 
P

Paul R. Sadowski [MVP]

Mike said:
I need to create a .bat or .cmd file that users can run to
copy their IE favorites to a mapped network drive. All
attempts thus far are not successfult. From the command
line I can run the script and it works just fine, but if I
careate a .txt, rename it with a .bat or .cmd, it does not
work. I receive an error message stating that "The system
cannot find the path specified.
File not found - Favorites". Can someone help me with
this please ASAP?

Did you double quote the path?
xcopy "%USERPROFILE%\Favorites" \\server\backups\whatever /s /e /y /i /c

The /c switch tells xcopy to continue even if there is an error. I like to
use it for backups but it's optional and up to you.

Now it is possible that there's a bad filename in there. I've seen it happen
on my own machine. The /C switch will allow the copy to continue anyway.

You really should post your code if this doesn't help you.
 
M

Mike

That was exactly what I needed! I didn't have the system
variable right. Thanks.
-----Original Message-----



Did you double quote the path?
xcopy "%USERPROFILE%\Favorites"
\\server\backups\whatever /s /e /y /i /c
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top