Microsoft
Software
Hardware
Network
Question : Need a batch file script/syntax to map a different share using the same/current drive letter. no DFS
no DFS
Were are moving the contents of network shares to another server, Im looking for a way to remap to the new share using the current drive letter. Different departments use different drive letters for the same share (application driven).
I need a batch file that the users from the different departments can run from the old network share to remap to the new share using whatever drive letter is currently used.
old share = \\filer\share
new share= \\file\share
This is what we want to accomplish:
1. Users come in to work and turn on their PC
2. They would open their network drive(whatever letter they are using) to access their network share and they would only see the mapping.bat file and a textfile instructing them to double click the batch file because their files and folders have been moved to another share location.
3. They would run the mapping.bat file
4. The batch file would map the new share using the current drive letter.
mapping.bat (located in the old share) contains the following:
@echo off
cls
net use [whatever drive letter is used]: /delete /y
net use [whatever drive letter is used]: \\file\food
exit
I guess to ask this question in another way is "How do you make the Drive letter a variable that corresponds to the current drive letter like how %systemroot% corresponds to the current install path & %username% corresponds to the current username used?"
net use [variable]: /delete /y
net use [variable]: \\file\food
Answer : Need a batch file script/syntax to map a different share using the same/current drive letter. no DFS
set CURRENT_DRIVE=%CD:~0,2%
Random Solutions
RAID Controller policy on Dell 2950-III PERC 6/i
Search is slow
Unattended SNMP Installation
SQL: Calculating the difference between two dates - working out the age of user given DOB
Access Reformat Report
OWALOGON.ASP Problems
Backup exec is giving me error backuping up SQL databases.
Do Not Have Permission To Send/Unable To Relay
mysqldump , how to check for errors
How to run a cgi script on a different server?