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
Deleting Retropsect Helper Service
Office 2007 / Outlook - problem with NormalEmail.dotm
I am using windows xp, in my machine newfolder.exe created by virus. its also creates subfolders in all folders with the same name.
Export data into multiple Excel Tabs using Reporting Services
Word Basic Error in Word 6
Allow Printer Installation for Domain Users
Forwarding e-mails to another domain in Exchange 2000
WMI GPO Filters
What happened to ASP Today?
msde versions, can they co-exist? MSDE 7 & SQL Server Express 2005