|
-
Jan 26th, 2010, 07:51 AM
#1
Thread Starter
Fanatic Member
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?
"Wisdom is only truly achieved, when you realise you dont know everything" ... I must be a genius because I always have to ask stupid questions...
Pointing an idiot like me in the right direction, is always appreciated by the idiot, explaining how to do what you have pointed the idiot to, is appreciated even more. I apologise to all experienced coders who will think I am an idiot, you are right, I am an idiot, but I am an idiot who is trying to learn
-
Jan 26th, 2010, 02:29 PM
#2
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\*.*
-
Jan 27th, 2010, 05:51 AM
#3
Thread Starter
Fanatic Member
Re: Batch File Variable
so how does foo recognise that I want to act upon each of the sub folders in the profiles directory?
"Wisdom is only truly achieved, when you realise you dont know everything" ... I must be a genius because I always have to ask stupid questions...
Pointing an idiot like me in the right direction, is always appreciated by the idiot, explaining how to do what you have pointed the idiot to, is appreciated even more. I apologise to all experienced coders who will think I am an idiot, you are right, I am an idiot, but I am an idiot who is trying to learn
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|