How to know whether pen drive has files or not - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: How to know whether pen drive has files or not (/Thread-How-to-know-whether-pen-drive-has-files-or-not) |
How to know whether pen drive has files or not - dipashri - 01-23-2014 Please tell me these scripts.I tried a lot but I can't 1)Test Script to know whether pend rive has files or not? 2)If we copy a file (ex:song) into pen drive,how to check whether song is copied into pen drive using qtp script RE: How to know whether pen drive has files or not - basanth27 - 01-24-2014 Hello Dipashri, You will have to substitute the drive of your external device instead of C:\ in the below code. find_file will search for a particular filename with its extension and report if it is found or not found. This should solve Query 1. For Query 2 you have to use the same function but probably tweak it a bit if necessary. I will leave that for you to explore Code: Set objFSO = CreateObject("Scripting.FileSystemObject") |