Help creating a bat file.

May 25, 2011 at 09:35:41
Specs: Windows 7, XP
I need to copy a certain directory via a bat file to local users PC. The problem is we are on Windows XP and Windows 7. How can i create a bat file that says:

If "C:\Users\%username%\AppData\Roaming\Microsoft\Signatures" exists then copy "\\remote_dir" to that location

If it doesnt exist then copy "\\remote_dir" to "C:\Documents & Settings\UserName\Application Data\Microsoft\Signatures"


See More: Help creating a bat file.

Report •

#1
May 25, 2011 at 11:36:17
if exist "filename...yadada" goto whatever


goto lable7
:whatever
do the thing you want
:eof
:lable7
do the other thing you want

mike


Report •

#2
May 28, 2011 at 00:52:46
if exist "C:\Users\%username%\AppData\Roaming\Microsoft\Signatures" copy \\remote_dir

if exists "C:\Documents & Settings\UserName\Application Data\Microsoft\Signatures" copy \\remote_dir

Subhash Chandra.
http://www.wintechgeek.com


Report •
Related Solutions


Ask Question