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

  • Thread starter Thread starter Mike
  • Start date Start date
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.
 
Try this


@echo off
cd /d c:\
cd %userprofile%
xcopy favorites /h /s /y (drive:path)
cls
exit
 
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.
 
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
 
Back
Top