Running batch file from shared out folder

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
just1812
Posts: 3
Joined: 19 Jul 2013 14:51

Running batch file from shared out folder

#1 Post by just1812 » 19 Jul 2013 21:37

I'm unable to change to the E: drive on the computer when executing the batch file from a shared out folder. However, I can change to the the C: or D: drives without issue.

The message I receive when attempting to change to the E: drive is "device is not ready". I'm able to run the batch script from the computer directly but am unable to run it when accessing the shared out folder from a different computer.

Image

I'm at a loss here any input would be appreciated.

Thanks!!

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Running batch file from shared out folder

#2 Post by foxidrive » 20 Jul 2013 04:36

What kind of device is E: drive? A DVD?

npocmaka_
Posts: 517
Joined: 24 Jun 2013 17:10
Location: Bulgaria
Contact:

Re: Running batch file from shared out folder

#3 Post by npocmaka_ » 20 Jul 2013 04:42

try first to map the drive with NET USE ->http://ss64.com/nt/net_use.html

just1812
Posts: 3
Joined: 19 Jul 2013 14:51

Re: Running batch file from shared out folder

#4 Post by just1812 » 22 Jul 2013 06:52

Thanks for the replies!

The E drive is a hard drive exactly like the C and D drives. The net use approach didn't help.

just1812
Posts: 3
Joined: 19 Jul 2013 14:51

Re: Running batch file from shared out folder

#5 Post by just1812 » 24 Jul 2013 07:32

Just figured out that the batch file is trying to change directories on my local computer instead of the remote computer. Does anyone have experience calling a batch file from a file share?

npocmaka_
Posts: 517
Joined: 24 Jun 2013 17:10
Location: Bulgaria
Contact:

Re: Running batch file from shared out folder

#6 Post by npocmaka_ » 24 Jul 2013 13:57

may be if you rewrite the batch to use relative paths...

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Running batch file from shared out folder

#7 Post by foxidrive » 25 Jul 2013 03:02

just1812 wrote:I'm at a loss here any input would be appreciated.


Show us your code - we'd be guessing, without seeing it.

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Running batch file from shared out folder

#8 Post by penpen » 25 Jul 2013 03:52

just1812 wrote:Just figured out that the batch file is trying to change directories on my local computer instead of the remote computer. Does anyone have experience calling a batch file from a file share?
I fear that calling this batch file from a share wouldn't help you, as your batch affects your computer no matter where it is stored.
It seems, that what you want to do is to remotely execute your batch file on another computer,
so you have to remote login and execute it remotely.

You may use the little helper tool PsExec as part of PsTools:
http://technet.microsoft.com/en-us/sysinternals/bb897553

Code: Select all

psexec \\computer[,computer2,...] -u user -p psswd cmd [arguments]
psexec @file -u user -p psswd cmd [arguments]
:: (@file: text file containing the computer names)

penpen

Post Reply