Deleteing TMP files

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
guyofer
Newbie
Posts: 4
Joined: Fri Sep 17, 2004 12:54 pm

Deleteing TMP files

Post by guyofer » Fri Sep 17, 2004 12:58 pm

I am trying to write a basic script which will allow me to delete tmp files.
I was thinking using the serach programwithin windows. Any suggestions?

Lumumba

Post by Lumumba » Fri Sep 17, 2004 1:35 pm

Let>RP_Wait=1
Run Program>cmd /c dir /b /s /o:g C:\*.tmp > c:\MyTemps2Delete.txt

Let>k=0

Label>KillTemps
Add>k,1
ReadLn>c:\MyTemps2Delete.txt,%k%,line
If>line=##EOF##,finish
DeleteFile>%filename%
Goto>KillTemps

Label>finish
MsgBox>Done !

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Sep 17, 2004 4:57 pm

Note: Some temp files may not be deleted because they are open.

May need to modify Lumumba's script to handle error messages, but knowing his talents, I suspect you won't have that problem here. That has probably already been taken care of.....
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Lumumba

Post by Lumumba » Fri Sep 17, 2004 10:39 pm

Woops, maybe those talents aren't enough ...
This line needs to be corrected to: DeleteFile>%line%
That has probably already been taken care of
TBH, No. But let's wait and see :wink:

Thx, Bob 4 Ur statement :)

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts