Jump to content

Recommended Posts

Posted

Search specific folder in all the drives and delete if found using QTP.

 

Dim fso, folder, file

Dim folderName, searchFileName, renameFileTo' Parameters

folderName = "C:\AutoRun_WEB"

searchFileName = "Temp"

 

Set fso = CreateObject("Scripting.FileSystemObject")

Set folder = fso.GetFolder(folderName)

 

For each file In folder.Files

searchFileName = "Temp"

If instr(file.name, searchFileName) <> 1 Then

' msgbox file.name

End If

Next

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



×
×
  • Create New...