I need a vb script to delete the runtime files.

My application is delevering C:\Windows\cr3.tmp, C:\Windows\crpo.tmp, C:\Windows\crcon.tmp etc,.(cr*.tmp)

Common naming among these files is cr*.tmp

Could anyone reply me with the appropriate script to delete these files.

Thanx in Advance
Sanjeev
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
If your application is delivering those file why cant you just edit your application, create an MST, and then delete the files from?

P
Answered 01/16/2009 by: Inabus
Second Degree Green Belt

Please log in to comment
0
I have created mst and installed the application. After launching the shortcut it is delevering some run time files

which I mentioned above. I have done some funcionality checking , after this also it is deleveing some run time files

but the files are having same naming convention like cr*.tmp. Here according to the functionality checking it is

delevering files.
Answered 01/16/2009 by: sanhivi
Second Degree Green Belt

Please log in to comment
0
strDir = "C:\WINDOWS"
Set fso = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")
Set objDir = FSO.GetFolder(strDir)
getInfo(objDir)
Sub getInfo(pCurrentDir)

For Each aItem In pCurrentDir.Files
If (LCase(Left(Cstr(aItem.Name), 2)) = "cr") AND fso.GetExtensionName(LCase(aItem.Name)) = "tmp" Then
aItem.delete(True)
End If
Next
For Each aItem In pCurrentDir.SubFolders
'wscript.Echo aItem.Name & " passing recursively"
getInfo(aItem)
Next
End Sub
Answered 01/16/2009 by: shweta_kar
Blue Belt

Please log in to comment
0
Thank u very much for the script.
Answered 01/16/2009 by: sanhivi
Second Degree Green Belt

Please log in to comment
Answer this question or Comment on this question for clarity