• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Net use /delete not working with XP

jjcarton

Junior Member
I have 32 locations that I am trying to update files to every night using Windows XP. When I do "net use p: \\10.200.1.1\sys /persistent:no" for the first location and transfer the files, everything works fine. After I do a "net use p: /delete", I do "net use p: \\10.200.2.1\sys /persistent:no" for the second location. XP will always go back to the 10.200.1.1 location unless I do a reboot. Is there a way to clear this out of memory without a reboot?
 
I've never seen that happen before... but why don't you try to use "net use p: \\10.200.1.1\sys", etc., instead of flagging it as nonpersistent? If you are manually deleting the connections anyway, then the persistency flag is redundant. I doubt it's the problem, but I suppose it couldn't hurt to try.
 
Originally posted by: jjcarton
Tried both persistent:no and persistent:yes with the same results.

Try it without declaring a persistency?

I'm just randomly guessing here, I'd try to help more, but I don't have any way to reproduce the issue right now.
 
There may very well be a problem with the networking components on the PC that is preventing NET USE from working properly, but assuming that the system itself is functioning, this is the formatting I would use in the batch file:


net use p: \\10.200.1.1\sys
copy *.* (or whatever files you need)
net use p: /delete /y
net use p: \\10.200.2.1\sys
copy *.*
net use p: /delete /y
net use p: \\10.200.3.1\sys
copy *.*
net use p: /delete /y

etc.

You don't need to specify a "persistent" parameter at all unless you specifically want a drive mapping to be persistent. The /delete /y parameters will force Windows to delete the drive mapping. If you don't include the /y parameter, Windows sometimes will not actually delete the mapping since it is waiting for you to answer yes or no to its prompt of whether or not you want to delete the mapping.

You can test the system's functionality by manually typing these commands into a Command Prompt one at a time. If all commands work manually, then they should also work in a batch file. If they do not work, then the error you get (or the command that fails) will help us know where to look for the problem within the OS.
 
Back
Top