Computing.Net > Forums > Disk Operating System > Automate DOS batch File

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Automate DOS batch File

Reply to Message Icon

Name: jkgla
Date: January 29, 2004 at 05:03:17 Pacific
OS: Win 98
CPU/Ram: 128Mb
Comment:

Hi!

I am trying to create a simple batch file to change a drive mapping, then run a program from the new drive - without a prompt!

My attempt:
net use S: \\linux2\sage
S:\sage.exe <yesfile

(Where yesfile is a textfile containing 'Yes Carriage return')

However, I get the message

net use S: \\linux2\sage
S: is currently \\LINUX1\SAGE.
The local device name S: is already in use.
Do you want to continue? (Y/N) [N]:

How can I get this batch file to run Sage on the new drive without human intervention?
(S: will always already be mapped)

Very many thanks in advance

Jkgla



Sponsored Link
Ads by Google

Response Number 1
Name: Phyto
Date: January 29, 2004 at 07:23:49 Pacific
Reply:

You can use the

NET DELETE

command to delete the s drive mapping before remapping it.


0

Response Number 2
Name: Wengier
Date: January 29, 2004 at 07:28:25 Pacific
Reply:

"NET DELETE" is not a valid command in a Win98 DOS box. But you can try this:

echo y|net use S: \\linux2\sage>nul


0

Response Number 3
Name: Phyto
Date: January 29, 2004 at 08:18:54 Pacific
Reply:

Sorry posted the info wrong,
the command you can try is

net use s: /delete

This string will delete the s: drive mapping


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Automate DOS batch File

Dos Batch File Commands www.computing.net/answers/dos/dos-batch-file-commands/11921.html

File Size in DOS Batch file www.computing.net/answers/dos/file-size-in-dos-batch-file/3105.html

DOS Batch file to FTP files from UNIX www.computing.net/answers/dos/dos-batch-file-to-ftp-files-from-unix/2105.html