Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with lots of files in a driectory

Status
Not open for further replies.

jeisner

Programmer
Jul 23, 2001
26
0
0
AU
eg. Code will say:

copy file A to B
delete A

Most of the time it is OK but at times B is created correctly but when the "delete A" line is run it says "file not found".

My theory is that because the directory that B is being placed contains approx 50,000+ files that control is returned to fox from the OS before the copy is complete and so when it runs the delete line it can't as it is still being copied.

1) Is this a logical conclusion?
2) Anyone know where I can find proof that our client shouldn't have 50,000+ files in a directory, as their IT manager is arguing the point with us, causing me a lot of trouble?
 
P.S. When this problem occurs, there is also lots of strain on the server from many users.
 
Having 50,000+ files in a directory is nuts. I am supprised anything runs.
 
Its a dual XEON server with 3GB of ram, and its only an archive directory. But I agree it is nuts, but they want proof, ie I can't find anywhere that MS say not to have 50,000+ files in a directory :(

Some clients can be real troublesome! :(
 
jeisner

The WinAPI functions CopyFile() and DeleteFile() will return a value to determine whether or not the operation was successful.

How it might work under the circumstances you describe is open to speculation.
FAQ184-2483 - the answer to getting answered.​
Chris [pc2]
 
mmmm, I got them to clean the directory (down to 20,000 files) and the problem has not re-occured as yet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top