Paging the batch file gurus ...

S

Steve Parry

We have a batch file that runs 3 times per day (and manually) to make
regular back up of users My Documents, Favourites, Desktop and some
important files in their Lotus Notes folder to their home folder on the
server.

This works great and is appreciated, particularly by the laptop users who
get backups of their files when on site.

However, one small irritation, I am rolling out AD to our sites throughout
europe at the moment and where the script line says something like

XCOPY "%USERPROFILE%\My Documents\*.* ..... ......

is great where the PC is set to english, but if Spanish or French etc the My
Documents etc are spelt in the local language.which means the script cannot
find the relevant folders.

Apart from, the not too harduous task of, re-writing the script as and when
required is the any variables I've missed that cover the "Desktop", "My
Documents" and the "Favorites" ?
 
J

Jerold Schulman

We have a batch file that runs 3 times per day (and manually) to make
regular back up of users My Documents, Favourites, Desktop and some
important files in their Lotus Notes folder to their home folder on the
server.

This works great and is appreciated, particularly by the laptop users who
get backups of their files when on site.

However, one small irritation, I am rolling out AD to our sites throughout
europe at the moment and where the script line says something like

XCOPY "%USERPROFILE%\My Documents\*.* ..... ......

is great where the PC is set to english, but if Spanish or French etc the My
Documents etc are spelt in the local language.which means the script cannot
find the relevant folders.

Apart from, the not too harduous task of, re-writing the script as and when
required is the any variables I've missed that cover the "Desktop", "My
Documents" and the "Favorites" ?

Using <B>REG.EXE</B>, built into Windows XP, Windows Server 2003, and later operating systems, or installed from the
<a href="../../SUBH/TIP3900/rh3968.htm">Windows 2000 Support Tools</A>,

reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /V Personal

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 
J

John John

You could create a new variable using the path at:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell
Folders\Personal.

John
 
J

John John

I did:

reg copy
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User
Shell Folders\Personal" HKCU\Environment\Personal

and now I can use %personal% as a variable to the Personal folder. But
I don't know how the users will add it to their variables using the
command if they don't have reg.exe on their local machines.

John
 

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

Similar Threads


Top