ur

how to delete main temp files

4 posts in this topic

#1 ·  Posted

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?

Share this post


Link to post
Share on other sites



#2 ·  Posted

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.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted

It didn't worked yesterday but working now.Don't know how it is.May be some environment issue.

 

Thanks for the help @JLogan3o13

Share this post


Link to post
Share on other sites

#4 ·  Posted

Yeah, that must be it ;)

 


√-1 2^3 ∑ π, and it was delicious!

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

  • Similar Content

    • WoodGrain
      By WoodGrain
      Hi All,
      I've got a script setup to drop a program into a temp folder and then run it from there, but I have mixed results, the Run() command will work on some computers but not others. The file will be placed into the temp folder in all cases. Running AutoIT 3.3.14.0. The computers are all either Win 7 or 8.1, x64 (exe is compiled to x64 too), UAC is off, all have local admin rights - if I've missed something ask and I'll update the details.
      If Not FileExists (@TempDir & "\HCTB") Then DirCreate(@TempDir & "\HCTB") FileInstall("G:\IT\Downloads\TB\12.0.45471\Host\TB_Setup-sif7r8pgcq.exe", @TempDir & "\HCTB\TB_Setup-sif7r8pgcq.exe", 1) Local $iPID = Run(@TempDir & "\HCTB\TB_Setup-sif7r8pgcq.exe", "") Any suggestions?
      Thanks!