Sign in to follow this  
Followers 0
Stokbroka

Batch File to AutoITScript

8 posts in this topic

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

Share this post


Link to post
Share on other sites



Bump

Anyone ??

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by bshoenhair

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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. :)

Share this post


Link to post
Share on other sites

Thanks guys, ill see what I can come up with

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0