UNC vs Drive Letter

Anything Really. Just keep it clean!

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
JRL
Automation Wizard
Posts: 3497
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

UNC vs Drive Letter

Post by JRL » Fri Nov 08, 2013 3:50 am

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

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Nov 11, 2013 2:23 pm

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.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts