Jump to content

how to delete main temp files


ur
 Share

Recommended Posts

My profile when I logged in to a machine, it is showing @TempDir to C:\Users\uday\AppData\Local\Temp\2 instead of C:\Users\uday\AppData\Local\Temp

But I need to delete a file in C:\Users\uday\AppData\Local\Temp folder.

So I kept the target as @LocalAppDataDir & "\temp"

It is expanding the value correctly and I confirm from messagebox also.

But the code is stopping at that line and I am not getting any error also, it is simply stopping the execution there.

Even I kept #RequireAdmin , but still same issue.

Any suggestions?

Link to comment
Share on other sites

  • Moderators
15 hours ago, ur said:

Any suggestions?

Yes, as usual, please post your code. You say "the code is stopping at that line" which indicates there is more to the script. As a simple one-liner...

FileDelete(@LocalAppDataDir & "\Temp\*")

...works just fine, please post your entire code so we're not having to guess.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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

×
×
  • Create New...