Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FILE() command slow
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01338142
Message ID:
01338145
Views:
16
>Hi,
>
>I'm looking at a FOXPRO 2.5 program and it has a IF statement checking for FILE() on a network directory which has 97K files and another network directory that has 45K files, so basically something like this
>
>IF NOT FILE('x:\test\cust.dbf') AND NOT FILE('x:\test2\empl.dbf')
>
>but it can take from a minute to 10 minutes to check, is there any other method to speed up the process? I'm thinking there might be some network issues regarding the slowdown also but I'm going to do some time trials using ADIR maybe or some other command that might be faster.
>
>Any ideas?
>
>Thanks.

You may try with ADIR or SYS(2000), but I'm not sure the speed would be better for this huge number of files in one directory.

You may try something like (not sure all commands are in FPD)
if directory('x:\test')
  if adir(laFiles, 'x:\test\cust.dbf') >0 && First file exists
  endif
endif
similar second check for the second file.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform