Just curious what others do when they write scripts that access files on network drives. Do you use UNC paths or do you use drive letters? I see advantages and disadvantages to each. Maybe you use UNC with IP addresses rather than server names? Maybe you dynamically create and destroy drive letters?
Let me know what you do and why you do it.
Thanks,
Dick
UNC vs Drive Letter
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7380
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Usually UNC paths as I can't always guarantee that there is always a mapping.
However, where there might be a commonly used permanent mapping I might use that.
I tend to use Windows Explorer to find the path and then copy the address out of that. So usually end up with a UNC path.
Having said that I do also have scripts that use drive letters but first also map the drive.
However, where there might be a commonly used permanent mapping I might use that.
I tend to use Windows Explorer to find the path and then copy the address out of that. So usually end up with a UNC path.
Having said that I do also have scripts that use drive letters but first also map the drive.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?