-
Batch File Variable
Hi All,
going back a decade or two, I am writing a Batch File to filter all the user profiles on the system.
D:\TSprofiles1\UsersNames is the location of all the files. normally I would use a command similar to
Code:
dp1.bat
CD D:\
CD D:\TSprofiles1
DEL D:\TSprofiles1\%1\Cookies\*.*
DEL D:\TSprofiles1\%1\Temporary Internet Files\*.*
Call DP1.bat UserName
Call DP1.bat User2Name
Call DP1.bat User3Name
However I am not sure if this will work on a windows server 2000. Is the %1 the variable to access all folders and subfolders within?
-
Re: Batch File Variable
dp1.bat foo
If this is dp1.bat
CD D:\
CD D:\TSprofiles1
DEL D:\TSprofiles1\%1\Cookies\*.*
DEL D:\TSprofiles1\%1\Temporary Internet Files\*.*
then
CD D:\
CD D:\TSprofiles1
DEL D:\TSprofiles1\foo\Cookies\*.*
DEL D:\TSprofiles1\foo\Temporary Internet Files\*.*
-
Re: Batch File Variable
so how does foo recognise that I want to act upon each of the sub folders in the profiles directory?