> "%~dp0%ComputerName%_delete_shares.bat" ECHO @ECHO OFF>> "%~dp0%ComputerName%_delete_shares.bat" ECHO CLS>> "%~dp0%ComputerName%_delete_shares.bat" ECHO ECHO.>> "%~dp0%ComputerName%_delete_shares.bat" ECHO ECHO You are about to delete all shares migrated from %ComputerName%.>> "%~dp0%ComputerName%_delete_shares.bat" ECHO IF /I NOT "%%ComputerName%%"=="%ComputerName%" ECHO This server is NOT the one that generated this batch file.>> "%~dp0%ComputerName%_delete_shares.bat" ECHO PAUSE>> "%~dp0%ComputerName%_delete_shares.bat" ECHO ECHO ON

:SyntaxECHO.ECHO ShareMig.bat, Version 1.00 for Windows 2000 / Windows Server 2003ECHO Prepare a migration of all shares from the current server to a new one.ECHO.ECHO Usage: SHAREMIG.BATECHO.ECHO When run on a server, this batch file will generate 4 files:ECHO.ECHO %%COMPUTERNAME%%_ORIGINALSHARES.TXT text file listing ALL shares;ECHO %%COMPUTERNAME%%_NETSHARES.TXT list of shares to be migrated;ECHO %%COMPUTERNAME%%_RECREATE_SHARES.BAT use this batch file to recreateECHO the shares on the new server;ECHO %%COMPUTERNAME%%_DELETE_SHARES.BAT undo and test batch file to deleteECHO the migrated shares again;ECHO.ECHO where %%COMPUTERNAME%% is the name of the server this batch file was executed on.ECHO Usually %%COMPUTERNAME%%_RECREATE_SHARES.BAT is the only file you'll need on theECHO new server; %%COMPUTERNAME%%_DELETE_SHARES.BAT is for testing purposes only.ECHO If all else fails, use the generated text files as a reference for manualECHO (re)creation of the shares.ECHO.ECHO Written by Rob van der WoudeECHO http://www.robvanderwoude.com

______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________