If fuzzy matching isn't possible, that would be highly unscientific.
$.writeln(File(Folder.desktop + “/Screen Shot*.*”).exists)
Similarly, copy(); does not support copying folders.
This feature is really disappointing.
Still, it's sufficient for most needs.
@dublove said: "If fuzzy matching isn't possible, that would be highly unscientific.
$.writeln(File(Folder.desktop + “/Screen Shot*.*”).exists)"
Matching is possible, but not in the way you tried it.
Let's suppose there is a folder on your Desktop named "ScreenShots" containing, amongst other files and folders, also files where the name starts with "Screen Shot …" you could supply a filter function to getFiles() to part files from folders and match only files where the name begins with "Screen Shot".
For example:
var myFolder = Folder( Folder.desktop +"/"+ "ScreenShots" +"/" );
var myFileListArray = myFolder.getFiles
(
function(file)
{
if
(
file instanceof File
&&
decodeURI( file.name ).match( /^Screen Shot/ )
&&
!file.hidden
)
return true
}
);
alert( myFileListArray.length );