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
Interactive Sorting with drill-down groups collapses group when sorting
DBase IV and Unexpected Error
How do I Install SSL 128bit for LWP ?
Emprex camera DSC3380S to work under Linux FC4, possible?
Access Query - how to manipulate date in format yyyymm
need a step by step on how to setup Reverse DNS for Exchange mail server.
Need information on Long Integer, Integer, Byte, Single, Double, Replication ID, etc.
PowerShell script to create/update/delete in Windows 2003 AD via csv file
Multiple AJAX calls / request at Ruby on Rails
SMTP Open Relay Authentication