|
|
|||||||
I'm pretty new with this. I'm writing logon scripts and haven't figured out how to handle spaces in the pathname of a mapped drive. Here's an example: $Drive = "O:" $Path = "\\server2\dp my files" USE $Drive /Delete USE $Drive $Path Written as such, it will not map. Is there anything in the manual that explains how to handle this? A page number would be helpful. Otherwise, if anybody else has suggestions, I would appreciate the help. Thanks, Khaunani |
||||||||
|
|
|||||||
Khaunani, Welcome to the board. Is this in Windows 9x or NT? What version of KiXtart are you using? Thanks, Kent |
||||||||
|
|
|||||||
Add: ? "@error @serror" after your USE statement. What is returned? $Drive = "O:" $Path = "\\server2\dp my files" USE $Drive /Delete USE $Drive $Path ? "@error @serror" |
||||||||
|
|
|||||||
Thanks for the welcome! Sorry I didn't give all the info. At least I can be guaranteed some type of post to my question. Anyway, this is on a Windows 2000 server and the workstation are Windows 2000 as well. Thanks, Khaunani |
||||||||
|
|
|||||||
What about Howard's suggestion? Any results from the @error and @serror codes? What version of KiXtart are you using? Kent [ 10. July 2003, 19:08: Message edited by: kdyer ] |
||||||||
|
|
|||||||
I add the line ? @error @serror when I ran the program, the message was: 67The Network name cannot be found.01 I am using the most recent version of Kixtart (sorry Kdyer) Khaunani |
||||||||
|
|
|||||||
What happens if you hard code it? use O: "\\server2\dp my files" @error ? @serror ? |
||||||||
|
|
|||||||
When I hard code it as you suggested, I get the message: 67 The network name cannot be found. 01 Thanks, Khaunani |
||||||||
|
|
|||||||
what hapens when you: net use O: \\server2\dp my files in a DOS window? Then net use O: "\\server2\dp my files" Is this the only share that has a problem or do all share fail? [ 10. July 2003, 21:00: Message edited by: Howard Bullock ] |
||||||||
|
|
|||||||
uhm. I haven't even tried sharenames with spaces... you could always try to use %20 in place of space but... anyway, why you need the spaces there anyway? others, are these types of shares working for you? I cant currently test (purely unix env) but think this could be investigated. |
||||||||
|
|
|||||||
khaunani, Try This: code:-Erik$Drive = "O:" ps. Only to Jooel, What is: %20 New KiX macro |
||||||||
|
|
|||||||
nah, no more cryptic than url-encoded space |
||||||||
|
|
|||||||
Okay, I'm really embarrassed to have to tell all of you this, but the problem was really simple. Thank you all for trying to help me out. First of all, the code was fine: $Drive = "O:" $Path = "\\server2\dp my files" USE $Drive /Delete USE $Drive $Path The problem was that I didn't look at the share name before I started all of this. It is actually a hidden share so all I had to do was add $ to 'files'. Again, I'm REALLY embarassed, but really impressed by how quickly all of you responded. I am posting another problem, so I hope I get the same positive responses. Thanks, Khaunani |
||||||||
|
|
|||||||
Just make sure to read the KiXtart Manual and the FAQ Forum in addition to some script debugging before posting the next question [ 12. July 2003, 15:49: Message edited by: sealeopard ] |