Articles

Solved net use * /delete with /y and /n?

October 17, 2012 at 00:30:16
Specs: XP PRo

i need to disconnect my shared folders but in the mean time if the user are still using the shared folder i do not want to disconnect them so i am thinking if its possible to use net use * /delete /y /n but it give me an error "a command was used with conflicting switches"

See More: net use * /delete with /y and /n?

Report •


✔ Best Answer
October 17, 2012 at 19:29:10

Thanks guys for your reply
i managed to solve my issue by using a freeware filezilla which enable to me to disconnect the user when they have idle for too long


#1
October 17, 2012 at 00:37:18

"a command was used with conflicting switches"

You cannot use /y and /n together in the same command string because they are opposites.


Report •

#2
October 17, 2012 at 00:40:49

is there any other way to go about? as i need to keep the connection alive and close it if its has been idle for too long. i have tried to use the net config server /autodisconnect but it don't disconnect the folders after the idle time

Report •

#3
October 17, 2012 at 01:45:30

If a process is using the shared folder - for example if it is the current directory for a process - net use won't close it. So I'm not quite sure what your problem is.

From the Microsoft documentation ( http://www.microsoft.com/resources/... ):

"You cannot disconnect from a shared directory if you use it as your current drive or an active process is using it."


Report •

Related Solutions

#4
October 17, 2012 at 01:52:26

my issue is that i need to let the user reenter the user and password whenever they close the folder and from what i know is that for the share folder to forget the user and password is when they log off or restart the system. the issue here is that the system are not able to restart or log off as the system are in use all the time and the shared folder is used by different people therefore i need to disconnect the shared folder so that the next user can use his/her user and password to connect to the shared folder as different user have different access level.
i am only using xp pro and not any server

Report •

#5
October 17, 2012 at 02:02:15

I still don't get it. Use

net use * /delete /y

If the share isn't being used it will delete the connection; if the share is being used it won't delete it.


Report •

#6
October 17, 2012 at 15:26:39

There might be a completely different way of tackling this requirement.
Your best bet is to post exactly what you are trying to achieve in the Programming Forum.

EDIT:
Sorry, overlapped with post above.

Always pop back and let us know the outcome - thanks


Report •

#7
October 17, 2012 at 19:29:10
✔ Best Answer

Thanks guys for your reply
i managed to solve my issue by using a freeware filezilla which enable to me to disconnect the user when they have idle for too long

Report •

#8
October 18, 2012 at 08:25:29

Glad to hear you sorted it and thx for popping back to let us know the outcome.

Always pop back and let us know the outcome - thanks


Report •


Ask Question