Copy link to clipboard
Copied
var poot=Folder("/eDesignArchive/eExtract/"+myJnum+mySFolder);
poot=Folder(poot.fsName);
var boot=poot.getFiles();
myMatches=[];
myArchive=[];
for (var j = 0; j < boot.length; j++) {
if(boot
.type!="????"){ myArchive.push(boot .name);} for ( i = 0; i < count; i++ ) {
pageImage =doc.visibleThumbnails.name;
if((pageImage.match ( boot
.name))){ myMatches.push(boot .name);} }
};
I am using this on the mac side and it returns all the different file types. I am trying to exclude a database file. On the mac I get different file types like 8bps or JPEG or TIFF. All the files are turning up ???? on pc. Not sure why. Any ideas? At first I thought my array was empty but I know now that its ok.
Copy link to clipboard
Copied
If you read the Scripting Guide you will see that this is a feature of the Mac OS and correctly returns ???? on windows…
Copy link to clipboard
Copied
Windows doesn't use the type property. The file type is determined by the file extension. One reason a file without an extension is almost useless on Windows. So I think you need to check both type and extension matches to exclude.
Copy link to clipboard
Copied
I ended up checking the file extention on the pc side. That was the only way I could get it to work. Thanks for your help.
Copy link to clipboard
Copied
On the Mac side an open getFiles() will return the OS hidden files too… You can exclude these with regular expression they start with a dot. Or you could loop looking for the hidden property…
#target bridge
var inFolder = Folder( Folder.desktop + '/Testing' );
var fileList = inFolder.getFiles();
alert( fileList.join( '\r' ) )
for ( var i = 0; i < fileList.length; i++ ) {
alert( fileList.hidden );
};
Copy link to clipboard
Copied
I just looked at the file name and checked for any .db files because that is the only hidden file i am running into. I am counting the rest.
poot=Folder(poot.fsName);
var boot=poot.getFiles();
myMatches=[];
myArchive=[];
for (var j = 0; j < boot.length; j++) {
pcName=boot
.name.split(".").pop(); if(pcName!="db"){ myArchive.push(boot
.name);} for ( i = 0; i < count; i++ ) {
pageImage =doc.visibleThumbnails.name;
if((pageImage.match ( boot
.name))){ myMatches.push(boot .name);} }
};