Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Files cant get it to seach files

Author
Message
Great Knight
21
Years of Service
User Offline
Joined: 25th Feb 2003
Location:
Posted: 30th Apr 2003 04:03
How do I make it for it searches for certain file formats
and make it search in a seperate folder. I cant seem to under stand the tutorails that came with dbp to understand it.
So can any one help me here.
AMD Atherlon 2400+ XP, 380 DDr memeory, ATI Radeon 9000 64 DDR.

And a Katana.
andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 30th Apr 2003 04:54 Edited at: 30th Apr 2003 05:20
First you need to find all the files in a specific directory



Then you need to extract each file name from the list, parse the extension from the file name, filter files, and save to an array.



Now you have an array full of the names of all files that have the extension of the filter.

Now use this code to see the contents of the array:



The only drawback of this code is if the file has a period in its name, it wont recognize it.

You can also search for files using Find first/ find next, but I like to do it this way.

Hope that helped.

"All programmers are playwrites and all computers are lousy actors" -Anon
Great Knight
21
Years of Service
User Offline
Joined: 25th Feb 2003
Location:
Posted: 30th Apr 2003 05:27
Thxs

AMD Atherlon 2400+ XP, 380 DDr memeory, ATI Radeon 9000 64 DDR.

And a Katana.

Login to post a reply

Server time is: 2024-09-20 07:57:46
Your offset time is: 2024-09-20 07:57:46