daiwhyte
asked on
DOS Batch File Help
Hi
Im trying to launch a bat file which clears out a few files from the users terminal server windows directory but Im not sure how to acheive this. Each time the user logs on, I want the batch file to run, I can get the file to run but I cannot get the syntax right to delete the file.
I tried this but its ignoring the %user% bit
del "c:\documents and settings\%user%\windows\st art.ini"
Any ideas guys?
DW
Im trying to launch a bat file which clears out a few files from the users terminal server windows directory but Im not sure how to acheive this. Each time the user logs on, I want the batch file to run, I can get the file to run but I cannot get the syntax right to delete the file.
I tried this but its ignoring the %user% bit
del "c:\documents and settings\%user%\windows\st
Any ideas guys?
DW
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you
"%userprofile%\windows\sta
I suggest you do this as one of the users run as "showme.cmd" or whatever from a logon script or cmd.exe etc.
@Echo off
set
pause
If one of the variables is showing nearer the correct path for your users then use that, otherwise try %userprofile% as above, then your hard coded path with %username% like LHT_ST suggested above.
Steve