/build/static/layout/Breadcrumb_cap_w.png

Need vb script to delete runtime files

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

Answers (4)

Posted by: Inabus 15 years ago
Second Degree Green Belt
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
Posted by: sanhivi 15 years ago
Third Degree Green Belt
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.
Posted by: shweta_kar 15 years ago
Blue Belt
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
Posted by: sanhivi 15 years ago
Third Degree Green Belt
0
Thank u very much for the script.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ