How I could check if network folder shared exists using batch script?

Example: \\\folder1\folder2\shared_folder

2 Answers 2


if exist \\\folder1\folder2\shared_folder echo It's here

  • Okey, I will try adn give you feedback :)
    – gedO
    Oct 4, 2013 at 14:27

A another option that will keep your script from hanging on a down system:

 ping -n 1 %1 >nul && if exist \\\folder1\folder2\shared_folder echo It's here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.