Solved

Network drive to changeing share names

Posted on 2013-10-28
3
485 Views
Last Modified: 2013-10-28
I have a NAS and I need to backup to it's USB drive. However, each USB drive makes  a different share name when connected.
So I need a script to connect a drive to one of 3 different share names.

Like this:

Net Use Z: \\server\share1
or, if not available
Net Use Z: \\server\share2
or, if not available
Net Use Z: \\server\share3

Batch file or VBS would be great!
Any ideas!
0
Comment
Question by:OneGoodGeek
  • 2
3 Comments
 
LVL 34

Accepted Solution

by:
Dan Craciun earned 500 total points
ID: 39606596
Why not use those exact commands in a .bat?

net use Z: \delete
net use Z: \\server\share1
net use Z: \\server\share2
net use Z: \\server\share3

It will connect on the working one and error on the rest.

HTH,
Dan
0
 

Author Closing Comment

by:OneGoodGeek
ID: 39606718
Ok, I feel stupid how easy that was!

Thanks a lot!
0
 
LVL 34

Expert Comment

by:Dan Craciun
ID: 39606835
I usually feel relieved if a solution is easy :) One less complicated thing to maintain.

You're welcome!
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to update Firmware and Bios in Dell Equalogic PS6000 Arrays and Hard Disks firmware update.
Create your own, high-performance VM backup appliance by installing NAKIVO Backup & Replication directly onto a Synology NAS!
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now