Script help.
Here's the script:
net use m: /del
net use m: \\Tco_sql01\Compa\Names\John Doe\Exchange\Record /USER:core_process\user password
I want it to automatically map the network drive when the computer starts up. Now because of the space in "John Doe" the script fails. It works up to "Names" folder, but not after. I can't edit the folder name because some of the programmers refer to it in their code and it would mess everything up. I would try to use the shorthand version, but there's not enough characters (6 I think?) before the space to identify it. Can anyone help?
net use m: /del
net use m: \\Tco_sql01\Compa\Names\John Doe\Exchange\Record /USER:core_process\user password
I want it to automatically map the network drive when the computer starts up. Now because of the space in "John Doe" the script fails. It works up to "Names" folder, but not after. I can't edit the folder name because some of the programmers refer to it in their code and it would mess everything up. I would try to use the shorthand version, but there's not enough characters (6 I think?) before the space to identify it. Can anyone help?
Comments
-
undomiel Member Posts: 2,818Try putting quotes around the path.
net use m: "\\Tco_sql01\Compa\Names\John Doe\Exchange\Record" /USER:core_process\user passwordJumping on the IT blogging band wagon -- http://www.jefferyland.com/ -
scheistermeister Member Posts: 748 ■□□□□□□□□□undomiel wrote:Try putting quotes around the path.
net use m: "\\Tco_sql01\Compa\Names\John Doe\Exchange\Record" /USER:core_process\user password
+1 If you have spaces use quotes.Give a man fire and he'll be warm for a day. Set a man on fire and he'll be warm for the rest of his life. -
Zoomer Member Posts: 126It still says "system cannot find the specified path". I tried the quotes up to the Names folder and it works. I think it is the space in John Doe still that is messing it up.
-
undomiel Member Posts: 2,818The quotes eliminate the problem that space was causing. Make sure you have your path entirely correct then.Jumping on the IT blogging band wagon -- http://www.jefferyland.com/