General discussion

  • Creator
    Topic
  • #2280429

    Batch file needed !!!

    Locked

    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….

All Comments

  • Author
    Replies
    • #3389552

      Reply To: Batch file needed !!!

      by syscokid ·

      In reply to Batch file needed !!!

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

    • #3389539

      Reply To: Batch file needed !!!

      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.

    • #3387708

      Reply To: Batch file needed !!!

      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

    • #3387666

      Reply To: Batch file needed !!!

      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.

    • #3387960

      Reply To: Batch file needed !!!

      by pop-eye ·

      In reply to Batch file needed !!!

      This question was closed by the author

Viewing 4 reply threads