Hi everyone -
Just learning to program with XOJO - have a newbie question.
I’m working on a simple filing app that will scan all the files within a folder, get each graphic file’s location and metadata, and log that data into a database. I’m tackling each step one by one, and got stumped on the first stage. (figures!)
I managed to create a pop up window that will only let you select graphic files that are JPEG and PNG, and select them, but I’m wondering how do I have XOJO scan a selected folder or subfolder?
If someone could point me in the right direction to scanning folders, that would be great.
Any input on the other stages would be awesome.
Here’s some of the code:
Dim SelectFilesDialogBox As New OpenDialog
Dim jpegType as New FileType
Dim pngType As New FileType
//set file types available in dialog box
jpegType.Name = “image/jpeg”
jpegType.MacType = “JPEG”
jpegType.Extensions = “jpg;jpeg”
pngType.Name = “image/png”
pngType.MacType = “PNGf”
pngType.Extensions = “.png”
//set dialog box characteristics
SelectFilesDialogBox.ActionButtonCaption = “Select Files”
SelectFilesDialogBox.CancelButtonCaption = “Cancel”
SelectFilesDialogBox.SuggestedFileName = “”
SelectFilesDialogBox.Title = “Select Files”
SelectFilesDialogBox.PromptText = “Select Files to Scan”
SelectFilesDialogBox.MultiSelect = True
//set initial directory - set this later to remember last used folder
SelectFilesDialogBox.InitialDirectory = SpecialFolder.Documents
SelectFilesDialogBox.Filter = jpegType + pngType[/code]
Edit (Paul): Formatted code as per Post Formatting Tips