Solved

Network drive to changeing share names

Posted on 2013-10-28
3
489 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

By default, Carbonite Server Backup manages your encryption key for you using Advanced Encryption Standard (AES) 128-bit encryption. If you choose to manage your private encryption key, your backups will be encrypted using AES 256-bit encryption.
How to update Firmware and Bios in Dell Equalogic PS6000 Arrays and Hard Disks firmware update.
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

860 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