Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 21061

Checking if a file exists in the Recycle Bin

$
0
0

Hello everyone,

 

Last week I posted a topic to get the current users SID to build a path to their Recycle Bin on disk (C:\$Recycle.bin\<SID>). I got the answer I was looking for, but as it turns out, aqFile.Exists() doesn't work for the recycle bin, as files are actually stored with a temporary name, and not the name they had when outside the recycle bin.

 

12/03/2015  12:27 PM           136,591 $RYXCIJU.zip
07/24/2015  08:51 AM           112,844 $RYXUSBX.tmp
12/09/2015  03:06 PM             6,416 $RYXXHBZ.7z
11/19/2015  03:38 PM           137,504 $RYYPJ6Q.ztl
07/10/2015  03:45 PM    <DIR>          $RYYRMP6.tmp
08/10/2015  11:21 AM             4,412 $RYYZOHE.zip

 

So, my new problem is this: Part of our regression testing requires that we verify deleting an item within our application moves it to the Recycle Bin. However, I don't know how to actually verify that the file exists in that directory. I read in a different topic that it's not a good idea to actually map items in Explorer, as this can cause failures on different versions of Windows.

 

Has anyone had any success verifying that a file is now in the recycle bin within TestComplete (KeywordTests or Script)?

 

Thanks for your time,

 

Matt


Viewing all articles
Browse latest Browse all 21061

Trending Articles