Stokbroka Posted April 12, 2005 Share Posted April 12, 2005 Hi All I am new to this AutoITScript. But looks very promising for me. I am trying to write the following batch file with AutoITScript but am struggling. Any help would be appreciated. The batch file cleans all junk files on all profiles on our terminal server. It would be handy to make this an exe with AutoITScript. for /d %%i in ("C:\Documents And Settings\*") do del /s /f /q "%%i\Cookies" for /d %%i in ("C:\Documents And Settings\*") do del /s /f /q "%%i\History" for /d %%i in ("C:\Documents And Settings\*") do del /s /f /q "%%i\Local Settings\Temporary Internet Files" for /d %%i in ("C:\Documents And Settings\*") do del /s /f /q "%%i\Local Settings\Temp" for /d %%i in ("C:\Documents And Settings\*") do del /s /f /q "%%i\NetHood" for /d %%i in ("C:\Documents And Settings\*") do del /s /f /q "%%i\PrintHood" for /d %%i in ("C:\Documents And Settings\*") do del /s /f /q "%%i\Recent" for /d %%i in ("C:\Documents And Settings\*") do echo y| rd "%%i\Local Settings\History\History.IE5" /s for /d %%i in ("C:\Documents And Settings\*") do echo y| rd "%%i\Local Settings\Temporary Internet Link to comment Share on other sites More sharing options...
Stokbroka Posted April 13, 2005 Author Share Posted April 13, 2005 Bump Anyone ?? Link to comment Share on other sites More sharing options...
bshoenhair Posted April 13, 2005 Share Posted April 13, 2005 (edited) not to familar with dos, see FileDelete in help file. Sorry. P.S index.dat still contains traces and can only be properly disposed of on the next startup, I beleive "RunOnce" or "RunOnceEx" via registry. Edited April 13, 2005 by bshoenhair Link to comment Share on other sites More sharing options...
drak Posted April 13, 2005 Share Posted April 13, 2005 it's going to depend on What %%i equals but I would take a guess at UserID's ?? also have a look at FileFindFirstFile & FileFindNextFile play with these & then come back with a bit of code to get more help Link to comment Share on other sites More sharing options...
condoman Posted April 13, 2005 Share Posted April 13, 2005 Take a look at the posts for _FileSearch. This routine will build an array of the files you want to manipuilate. Then use filedelete to clean them up. Link to comment Share on other sites More sharing options...
Stokbroka Posted April 13, 2005 Author Share Posted April 13, 2005 Thanks guys, ill see what I can come up with Link to comment Share on other sites More sharing options...
SvenP Posted April 13, 2005 Share Posted April 13, 2005 Hi AllI am new to this AutoITScript. But looks very promising for me. I am trying to write the following batch file with AutoITScript but am struggling. Any help would be appreciated.The batch file cleans all junk files on all profiles on our terminal server. It would be handy to make this an exe with AutoITScript.for /d %%i in ("C:\Documents And Settings\*") do del /s /f /q "%%i\Cookies"for /d %%i in ("C:\Documents And Settings\*") do del /s /f /q "%%i\History"for /d %%i in ("C:\Documents And Settings\*") do del /s /f /q "%%i\Local Settings\Temporary Internet Files"for /d %%i in ("C:\Documents And Settings\*") do del /s /f /q "%%i\Local Settings\Temp"for /d %%i in ("C:\Documents And Settings\*") do del /s /f /q "%%i\NetHood"for /d %%i in ("C:\Documents And Settings\*") do del /s /f /q "%%i\PrintHood"for /d %%i in ("C:\Documents And Settings\*") do del /s /f /q "%%i\Recent"for /d %%i in ("C:\Documents And Settings\*") do echo y| rd "%%i\Local Settings\History\History.IE5" /sfor /d %%i in ("C:\Documents And Settings\*") do echo y| rd "%%i\Local Settings\Temporary Internet<{POST_SNAPBACK}>Something similar had been asked in this topic:http://www.autoitscript.com/forum/index.php?showtopic=9999Probably you can adapt that one to suit your needs?Regards,-Sven Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted April 14, 2005 Share Posted April 14, 2005 This might help http://www.autoitscript.com/autoit3/docs/macros.htm Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now