Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


Use cmd to access shared files

  • Please log in to reply
3 replies to this topic

#1 ThomasDG


  • Members
  • 59 posts
  • Gender:Male
  • Location:Carmel, IN
  • Local time:12:21 AM

Posted 15 July 2010 - 09:06 AM

I have a .bat file on my computer inside of a shared file. I would like to run this bat file from another computer through the command prompt window. I have tried using the [ip]\[folder name]\[bat file name] as well as using the computer name in place of the ip address.


BC AdBot (Login to Remove)


#2 CaveDweller2


  • Members
  • 2,629 posts
  • Gender:Male
  • Local time:12:21 AM

Posted 17 July 2010 - 06:29 PM

Look up how to use psexec might be what you are looking for.

Hope this helps thumbup.gif

Associate in Applied Science - Network Systems Management - Trident Technical College

#3 Baltboy


    Bleepin' Flame Head

  • Members
  • 1,432 posts
  • Gender:Male
  • Location:Pennsylvania
  • Local time:12:21 AM

Posted 24 July 2010 - 09:38 AM

you need to map a drive to the shared folder and then type the full path to the file using quotes if there is a space in any of the file names like "C:\Program Files\johnsfiles\whatever.bat"

Even easier write a second batch file that maps the drive and then runs the program automatically!!
Get your facts first, then you can distort them as you please.
Mark Twain

#4 strolln


  • Members
  • 400 posts
  • Gender:Male
  • Location:N. Calif.
  • Local time:08:21 PM

Posted 24 July 2010 - 09:54 AM

You could do a mapped drive as suggested but it's not necessary. You can do what you want but you need to do know the name of the share and then you can reference your .bat file like this: \\[remote computer name]\[share name]\my.bat. For instance I have a computer on my network named Batman that has a shared folder called Downloads. In that folder I have test.bat. I can execute test.bat with this command: \\Batman\Downloads\test

The shared folder on Batman is actually on the E: drive on that machine but the name of the share is Downloads so the E: reference isn't needed.

Edited by strolln, 24 July 2010 - 10:03 AM.

To Err is human; to really foul things up requires a Bleeping Computer!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users