Link to home
Start Free TrialLog in
Avatar of OGSan
OGSanFlag for United States of America

asked on

Files copied to new network share - need to update shortcuts - how?

Our IT Dept has copied all of our files to a new network share.  The files in the original location were still accessible.  Since many employees did not update their shortcuts, they wound up maintaining the files in the original location.  Others, of course, are maintaining files in the new location.
...Sigh.
I found a shareware utility that will synchronize the files across two locations (http://www.alwaysync.org), which is working just great.
The other problem is:  How can I update the shortcuts on each employee's PC to ensure that they are pointing to the correct network share?
Here is an example:
"Y" drive letter mapped to Original location:  //nfs1/dept/hr/hris
needs to be updated to map to New location:  //ad.companyname.com/nfs1/dept/hr/hris
Somehow I need to update each mapped drive letter by inserting "//ad.companyname.com/" in place of the leading "//".  Is it possible to create a script to do this that each individual can run on their own?
Avatar of Brad Bouchard
Brad Bouchard

It would be super easy.  Create a logon script and apply it through Group Policy at the Computer level.  Simply create a batch file that checks for the old mapped y drive, then, if it exists, removes that y drive, and recreates a new mapped drive y that goes to the new location.  something like this

net use y: /delete
net use y: \\SERVERNAME\NEWSHARE /persistent:yes

Create a text file with those two lines in it and save it as a .bat file.  Create the logon GPO in Group Policy Management and apply it to whatever OU you want it on.  Let it run for a week or until you're sure it's touched every one's computer.  Then just remove it as it won't be needed.
My above suggestion doesn't actually check for the old Y mapping and remove it, it just removes any mapped Y drive on the computer, then recreates it with the new mapping.  If you really wanted it to only create the new Y mapping after it had checked for the old y, removed it, then re-created it, simply add an if/then statement to the script.  Something like:

IF NOT EXIST Y:\
END
ELSE
NET USE Y:\\SERVERNAME\NEWSHARE /PERSISTENT:YES
END
SOLUTION
Avatar of Brad Bouchard
Brad Bouchard

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You got it my friend.  No objection here.
Avatar of OGSan

ASKER

I found this article after searching through the article provided by xBrouchardx.