General discussion

Locked

Batch file needed !!!

By pop-eye ·
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....

This conversation is currently closed to new comments.

9 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by SyscoKid In reply to Batch file needed !!!

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

Collapse -

by pop-eye In reply to

Poster rated this answer.

Collapse -

by Cactus Pete In reply to Batch file needed !!!

If you have any spaces in the path or filename, be sure to put "quotes" around it.

Collapse -

by pop-eye In reply to

Poster rated this answer.

Collapse -

by JackOfAllTech In reply to Batch file needed !!!

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

Collapse -

by pop-eye In reply to

Poster rated this answer.

Collapse -

by GuruOfDos In reply to Batch file needed !!!

Agree to all above...

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

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

Collapse -

by pop-eye In reply to

Poster rated this answer.

Collapse -

by pop-eye In reply to Batch file needed !!!

This question was closed by the author

Back to Windows Forum
9 total posts (Page 1 of 1)  

Related Discussions

Related Forums