Computer Science Canada Help: Saving and Analysing file names to determine extension |
Author: | #CRob [ Fri Feb 10, 2006 8:54 pm ] |
Post subject: | Help: Saving and Analysing file names to determine extension |
Hello, I want to save a list of files [using the fileName := Dir.Get (streamNumber)] I then want to save the files to an array, determine the length of wach string, analyse each character, find a given pattern [eg .mp3] and display the file names with said given pattern. Is this possible and if so how could I go about doing this. If it's not possible does anyone else have any other ideas that could lead to the success of my idea? PS: My Goal- To be able to organize files by there extentions [ I know there are some things like this but they cannot display anything if there is no space between the file name and extension] |
Author: | Cervantes [ Fri Feb 10, 2006 9:02 pm ] |
Post subject: | |
It's possible. You'll need to make a flexible array to store the fileNames. You can then use some String Manipulation to find the extension. You can then sort that array, based on the extension. ![]() |
Author: | #CRob [ Fri Feb 10, 2006 9:39 pm ] |
Post subject: | |
You just made my weekend. Thanks! I'll post up if I figure out how to do properly. |