LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DeleteFile returns error when directory has >32,000 files in it.

I have a directory that dump text results files into for history.  With a few test systems running it gets a lot of small files in it.  I have an application that uses DeleteFile() to attempt to delete a file if already exists before writing a new one (title has UUT serial number in it).  I get an error (not ACCESS_DENIED or NO_FILE) when the number of files in the directory gets near 32,700.  Is there a timeout value or other limit to this function?  Is there another function I can use (SDK)?  I'm using CVI 6.1.  Thanks.
 
0 Kudos
Message 1 of 3
(3,354 Views)
Hi,
 
Maybe you could try using the Windows SDK function which has the same name as the CVI function :
 
BOOL DeleteFile(LPCTSTR lpFileName);
 
Because it has the same name as  the CVI function you should use :
 
#include <windows.h>
#undef DeleteFile
 
 
Kind regards,
0 Kudos
Message 2 of 3
(3,337 Views)
This issue was resolved in CVI 8.0 - in case you are looking to upgrade.
0 Kudos
Message 3 of 3
(3,313 Views)