Jump to content

Batch File to AutoITScript


Recommended Posts

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

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 by bshoenhair
Link to comment
Share on other sites

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

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

<{POST_SNAPBACK}>

Something similar had been asked in this topic:

http://www.autoitscript.com/forum/index.php?showtopic=9999

Probably you can adapt that one to suit your needs?

Regards,

-Sven

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...