Discussion Locked

Batch file needed !!!

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I need a batch file. any guru's out there?
What I need is a file that checks a condition, in true - exits, false copys a shortcut (stored on server) to the users desktop.

So, something like this...

if xxx.xxx exists (on the desktop) then end
else xxx.xxx doesnot exist, then copy xxx.xxx from \\server\share to desktop
end

Thanks in advance....

9 replies

by syscokid

if exist C:\desktop\filename goto end
copy \\server\share\filename C:\desktop
end

by jackofalltech

Not to be picky, but could be shorter (all on one line)

if not exist "C:\desktop\filename" copy "\\server\share\filename" "C:\desktop"

Ralph

by guruofdos

Agree to all above...

Assuming it's a Windows (DOS based) system!

You would probably need something slightly different for Unix/Linux.

This discussion is closed to new replies.