Jump to content

autoit script is not usefull with this command


Recommended Posts

hi

really i try many time to delete files that exists in temp folder in win 7 but i can not

can any one to help me and give me codes to delete this files

there is not any problems with xp but in win 7 cann't delete them

Link to comment
Share on other sites

Maybe the files that are not deleted are locked or in use. Did you checked that?

if you have win 7, you can try for deleting files in temp folder by scripts

believe me you can not delete them by autoit but you can delete them manually

i can delete files in temp folder manually but i can not delte them by autoit script

Link to comment
Share on other sites

  • Developers

This is likely because a file in this directory is still in use and the command stops.

Try is with a single file and tell us if that works.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

This is likely because a file in this directory is still in use and the command stops.

Try is with a single file and tell us if that works.

Jos

jos jos hahahaha

how are you

really i miss you hahahaha

ok i want make tool to clean pc --- pls give me solve for this problem

Link to comment
Share on other sites

  • Developers

jos jos hahahaha

how are you

really i miss you hahahaha

Don;t think I was trying to be funny and guess you did not really miss me.

ok i want make tool to clean pc --- pls give me solve for this problem

Have you read my answer and if so: what was the result?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Get the files into an array first then loop through the array and it will work just fine.

$iDeleted = 0
For $i = 1 To Ubound($aFiles) -1
    If NOT FileDelete($aFiles[$i]) Then $iDelete += 1
Next

Using wildcards is no good when there is a chance the delete will fail for any reason and in this case the others are probably correct in saying you have a file in use at the time you are running the script.

Something else you want to look at in the temp folder is the fact you can not FileDelete a Folder. For that you have to use DirRemove()

For $i = 1 To Ubound($aFiles) -1
    If StringInStr(FileGetAttrib($aFiles[$i]), "D") Then
        DirRemove($aFiles[$i])
        ContinueLoop
    EndIf
    FileDelete($aFiles[$i])
Next
Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

  • Developers

that is no solve for any problem

ccleaner always delete them

i can delete them manually

you must think to best in autoit script

run your mind to find some solve for this problem

Again, and this time answer me because else you will get the same treatment as the last time only this time a little longer.

Have you tested what I asked you to do?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I'm sorry but that does solve the problem. I have my own cleaner which includes the temp folder and the only files ever left behind are those that are in use. That cleaner uses code similar to what I gave you with the exception that I have some error checking in it.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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