19 April 2009, 14:12 | #1 |
Registered User
Join Date: Feb 2008
Location: Sydney, Australia
Age: 54
Posts: 100
|
File search with C
Jeeez I'm crap
I knew I was rusty but this is beyond rusty! I've written a quick function to search for 2000 files through 27 directories... Maybe I should have spent a little more time on it because in 50 mins it's only found 227 of the 2000!!! |
19 April 2009, 14:24 | #2 |
Global Moderator
Join Date: Aug 2008
Location: Sidcup, England
Posts: 10,300
|
|
19 April 2009, 14:44 | #3 |
Registered User
Join Date: Feb 2008
Location: Sydney, Australia
Age: 54
Posts: 100
|
|
22 April 2009, 01:24 | #4 |
Tik Gora :D
Join Date: Oct 2001
Location: Round yo momma's
Posts: 1,273
|
Brakus - Its not doing something mistakenly like once its found a file it goes back to the start position and searchs onwards thru all its just dismissed in the previous search until it finds the next file ? etc...
Perhaps you want to past some code for our perusal ? |
22 April 2009, 01:35 | #5 | |
Global Moderator
Join Date: Aug 2008
Location: Sidcup, England
Posts: 10,300
|
Quote:
That's a good idea too. |
|
15 May 2009, 02:17 | #6 |
Registered User
Join Date: Feb 2008
Location: Sydney, Australia
Age: 54
Posts: 100
|
Sorry gents, missed your replies...
I'm at work so can't post the actual code, but it checks each file against 27 directories eg. Code:
while(!FILE && x<27) { strcpy(path,directory[x]) strcat(path,filename) FILE = fopen(path,r) x++; } I've put this to a side for a moment while I finish some other bits of the app. but will have to get back to it soon |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PD search | DeafDaz | request.Other | 3 | 13 August 2011 01:10 |
File .NFO & file ID.diz stuff.... How To..!! | DC33 | support.Other | 4 | 11 March 2009 10:21 |
Running non .adf file, .info file?? | ypestis | New to Emulation or Amiga scene | 5 | 29 March 2006 18:53 |
no game for search.. | Joe Maroni | Games images which need to be WHDified | 5 | 08 May 2004 01:29 |
|
|