Use UNC in .bat file?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a simple .bat file which runs well if I hard code a drive letter.
However I would like to know if there is a way to specify a full UNC?
This is how it is now (it runs, and accomplishes what it needs to):

@echo off
u:
cd edi\ediformatter\telecom\
CALL FWEDI.EXE FWEDI.SRC FWEDI.DST MSBIN

I would like to do something like the following (which doen't work)

@echo off
\\Server_name\Share_name\edi\ediformatter\telecom\
CALL FWEDI.EXE FWEDI.SRC FWEDI.DST MSBIN

Thank you in advance,
God bless you
Andy
 
Try:

CALL "\\Server_name\Share_name\edi\ediformatter\telecom\FWEDI.EXE FWEDI.SRC FWEDI.DST MSBIN"

Remember the quotes.

--
Mark-Allen Perry
ALPHA Systems, Switzerland
mark-allen AT mvps DOT org

I have a simple .bat file which runs well if I hard code a drive letter.
However I would like to know if there is a way to specify a full UNC?
This is how it is now (it runs, and accomplishes what it needs to):

@echo off
u:
cd edi\ediformatter\telecom\
CALL FWEDI.EXE FWEDI.SRC FWEDI.DST MSBIN

I would like to do something like the following (which doen't work)

@echo off
\\Server_name\Share_name\edi\ediformatter\telecom\
CALL FWEDI.EXE FWEDI.SRC FWEDI.DST MSBIN

Thank you in advance,
God bless you
Andy
 
What happens if you;
@echo off

\\Server_name\Share_name\edi\ediformatter\telecom\FWEDI.EXE FWEDI.SRC
FWEDI.DST MSBIN

all on one line.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| I have a simple .bat file which runs well if I hard code a drive letter.
| However I would like to know if there is a way to specify a full UNC?
| This is how it is now (it runs, and accomplishes what it needs to):
|
| @echo off
| u:
| cd edi\ediformatter\telecom\
| CALL FWEDI.EXE FWEDI.SRC FWEDI.DST MSBIN
|
| I would like to do something like the following (which doen't work)
|
| @echo off
| \\Server_name\Share_name\edi\ediformatter\telecom\
| CALL FWEDI.EXE FWEDI.SRC FWEDI.DST MSBIN
|
| Thank you in advance,
| God bless you
| Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Bat files 2
.bat file in Excel with parameters 5
Running .bat files minimized from scheduler 11
BAT File to Run 3 Programs 4
BAT FILE 2
bat file 1
UNCs in batch files 2
Sleep before starting app using BAT file? 3

Back
Top