Thread: [Solved] Need Help With KILL Command
View Single Post
 
Old 12-09-2013, 10:07 AM
PosseJohn PosseJohn is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Jul 2011
Posts: 20
PosseJohn is on a distinguished road
Default Need Help With KILL Command

I have several files, that, after they are closed leave residual files in the folder.

What I mean, as an example, is after I close "U2TO 131025 1746.docm", another file "~$TO 131025 1746.docm" remains in the folder.

I periodically go in and delete all these "~$" files, but am looking for a programable solution.

Any ideas are welcome...

I attempted the following code, but it does NOT delete the "~$" files:
Code:
 
Sub DeleteTMPFiles() 'This is to 'clean-up' any temporary files in the various folders On Error Resume Next Kill "\\...\ShiftTurnover\" & "*.tmp" Kill "\\...\ShiftTurnover\" & "~$*.*" End Sub
Reply With Quote