Check if a folder or file is selected?
Posted: 17 Jul 2011 11:08
is report() a good / practical way to decide if the user has selected a directory or a file (or multiple files)?
If a directory is selected (e.g. "test.test1.test2") than
displays: test.test1.test2?|
-> No extension (after the question mark) so I could test if the {Ext} is "" but my problem is that I sometimes have unix files with no extension, too and in this case the same check would result in "" for a file.
Is there a different / better way to do such a check?
If a directory is selected (e.g. "test.test1.test2") than
Code: Select all
$SelectedItems = report("{Basename}?{Ext}|",1);
msg SelectedItems;
-> No extension (after the question mark) so I could test if the {Ext} is "" but my problem is that I sometimes have unix files with no extension, too and in this case the same check would result in "" for a file.
Is there a different / better way to do such a check?