dasdeck ·
is there a way to differ between folders and files? it would be nice to be able to, so one can bould custom file dialogs/browsers.
D3CK
P.S.: you could for example add a "\" or "/" prefix to the entrys wich are folders.
From the original SynthMaker forum (2004–2014), with its members’ names and dates.
dasdeck ·
is there a way to differ between folders and files? it would be nice to be able to, so one can bould custom file dialogs/browsers.
D3CK
P.S.: you could for example add a "\" or "/" prefix to the entrys wich are folders.
Tom7777 ·
I have recently been making a file browser system, i think some default module folder tools would be great as i can't really use the parser very well yet so these would be very helpfull for this type of thing.
rl ·
maybe there is a small workaround:
After triggering the FindFiles you could iterate (StringGetAt) over the entries and test for directories: append "\*.*" and feed that into another Findfiles. If it was a directory you get at least 2 entries (Number of files found) for "." and ".." (but not at toplevel (c:\, d:\,....)!!!!!) If it was a file you get exactly 0 (zero) entries
BTW: the FileDlg companion still has it's quirks:
FileFilters Input is not working (e.g. "*.txt", only works as filtype "txt"). After opening and clicking on the filetype dropdown some lines with random characters appear.
Keystrokes in a string connected to FileFilters immediatiely trigger the dialog without touching the trigger input
Only files can be selected (no directories)
FR: May I suggest a FileInfo Module? with outputs: Type (Directory, File, Special File), Extension, Size, Date, Owner?, Permission?
dasdeck ·
i thought if yor workaround too rl, but i think its too heavy, imagine 1000 folders?
rl wrote: BTW: the FileDlg companion still has it's quirks:
FileFilters Input is not working (e.g. "*.txt", only works as filtype "txt"). After opening and clicking on the filetype dropdown some lines with random characters appear.
this is not a bug, you have to pass a string witch a specific format. look here: [old link]
Keystrokes in a string connected to FileFilters immediatiely trigger the dialog without touching the trigger input
yeah, thats true, file selector opens way too often.
Only files
..and only ONE file..
can be selected (no directories)
yeaa, too true. but you can get a workaroud if you want to select folders. just use custom parser to cut the file string off the folder string.
D3CK
Tom7777 ·
Well i just finished what i was making, it's a expand folder browser type thing where you click on a folder name and it will expand and list all the files in that folder, it works quite well but certain parts of it required me do enter things in manually like the Folder name which i tried to use a example that trims the folder name from a path but the example did not work so i had to type just the folder name, also some of the view translate modules require connection from the other ones so it looks right. But if i use this for a rompler or something it would be simple enough to do this 10 or 20 times depending on the amount of folders i had. Would be nice to have the folder name update without entering it though.
What i think would be best to do this is simply adding a Folder Name output to the Find Files module and then no parser system would be needed to do it.
rl ·
dasdeck wrote: this is not a bug, you have to pass a string witch a specific format. look here: [old link]
Thanks, I've missed that thread
dasdeck wrote: yeaa, too true. but you can get a workaroud if you want to select folders. just use custom parser to cut the file string off the folder string.
yes, but isn't it totally illogical and unintuitive to move into a folder and select a file in order to select the folder itself? (what if the folder is empty?)
Tom7777 ·
Wouldn't you just use the All files (*.*)|*.*|| on the end of the folder location, i used a combination of this and the text module to extract the file list then just use a parser after to extract the data, then use the file amount to edit this data with what you are wanting to do, but i do think you are limited with what you can do with the folders even though theres a few ways you can use them right now. Im not sure if the find files lists folders also but if not the Find Files module should have a bool input or something for this which would allow for alot more options, also with the new string modules coming you could probably set up various systems to process folder data.
dasdeck ·
rl wrote: what if the folder is empty
nothing or just create an (almost) useless file. 😀
D3CK
Wrote something here? To have a post removed or your name hidden, write to [email protected].