Skip to main content
bagonterman
Inspiring
August 5, 2013
Question

.type on PC side is showing ???? for all of .type

  • August 5, 2013
  • 2 replies
  • 1136 views

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.

This topic has been closed for replies.

2 replies

Inspiring
August 5, 2013

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.

bagonterman
Inspiring
August 5, 2013

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.

Inspiring
August 5, 2013

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 );

   

};

Inspiring
August 5, 2013

If you read the Scripting Guide you will see that this is a feature of the Mac OS and correctly returns ???? on windows…