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
Secutiy tab and summary tab missing on the file
Copied oracle schema is slow
Urgent!!!Replication problem
Trying to create a punch in time clock in excel
Citrix Presentation server cannot contact the license server
hide specific content on page from bot
SQL Server 2005 Report Manager Issue
C-ISAM
Diagnostic-Code: smtp;550 Requested action not taken: mailbox unavailable
Outlook 2003 problem (with error event detail)