Page 1 of 1 1
Topic Options
#152007 - 2005-11-22 08:09 PM net use and cmd line
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
I can't remember how to do this (without a file)

I want to "net use s: /d" a drive that may have a file lock (open file)

from the cmd line it prompts: Is it OK to continue disconnecting and force them closed? (Y/N) [N]:

I want to provide it the "y" on the cmd line

If I do this:
net use s: /d <y

It assumes y is a file

Any ideas??
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#152008 - 2005-11-22 08:22 PM Re: net use and cmd line
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
pipe echo

echo y | bla bla bla
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#152009 - 2005-11-22 08:28 PM Re: net use and cmd line
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
tried that.
Code:


C:\Documents and Settings\wheelerc>net use s: /d |echo y
y


C:\Documents and Settings\wheelerc>

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#152010 - 2005-11-22 08:31 PM Re: net use and cmd line
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
Code:

C:\Documents and Settings\wheelerc>echo y | net use s: /d
There are open files and/or incomplete directory searches pending on the connect
ion to s:.

Is it OK to continue disconnecting and force them closed? (Y/N) [N]:
No valid response was provided.

C:\Documents and Settings\wheelerc>

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#152011 - 2005-11-22 08:58 PM Re: net use and cmd line
Stanley Offline
Starting to like KiXtart

Registered: 2004-06-03
Posts: 130
Loc: Upstate NY, USA
net use :s /d /y
_________________________
Taxation WITH representation isn't so hot, either!

Top
#152012 - 2005-11-22 09:01 PM Re: net use and cmd line
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
DUH...

I'd feel more gracious, if I didn't feel so stupid
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#152013 - 2005-11-22 09:12 PM Re: net use and cmd line
Stanley Offline
Starting to like KiXtart

Registered: 2004-06-03
Posts: 130
Loc: Upstate NY, USA
No worries.
I am the Master of forgetfulness.
_________________________
Taxation WITH representation isn't so hot, either!

Top
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1046 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.035 seconds in which 0.012 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org