Skip to main content
Known Participant
July 30, 2009
Answered

[AS] How can I find files created in CS2?

  • July 30, 2009
  • 4 replies
  • 1380 views

My company has 2000+ documents in a sytem that have been created using both InDn CS2 and CS3.

I need to be able to list all of the files that have not been updated to CS3. I've tried querying a known CS2 file using applescript and the FInder but the result only gives me InDn with no version.

I've asked for: file name, creator type and product version when querying the file, but product version doesn't give any result.

Result is (*Vue.indd, InDn, *)

Can this be done from the finder or do I have to script InDesign to query the documents? Obviously using InDesign will increase the query time.

Thanks for taking the time to read this.

This topic has been closed for replies.
Correct answer Kasyan Servetsky

Kasyan - just to let you know, the IDd5 bit does work, but the test file I copied registered as a TEXT file for some reason, even though it had ".indd" extension.

Don't you just love computers!

Thanks again

Andrew


...but the test file I copied registered as a TEXT file for some reason, even though it had ".indd" extension.

Probably you copied them from windows machine and since windows doesn't use this property it was set by Mac OS to default value: TEXT.

Kasyan

4 replies

July 30, 2009

If you need to figure out version of both Window and Mac files from a Mac, this is how I do it:

--Parse file type for version
on parseFileType(myFile)
     set fileVersion to ""
     tell application "Finder"
          set thisFileType to file type of myFile
     end tell
     if thisFileType ≠ "" then
          if thisFileType = "IDd3" then
               set fileVersion to "3"
          else if thisFileType = "IDd4" then
               set fileVersion to "4"
          else if thisFileType = "IDd5" then
               set fileVersion to "5"
          else if thisFileType = "IDd6" then
               set fileVersion to "6"
          else
               log "Getting version by hand..."
               --Adobe InDesign 3.0
               --Applescript sucks at parsing large files, use grep instead
               set grepString to "Adobe InDesign [0-9]"
               set theCmd to "grep -rao \"" & grepString & "\" \"" & POSIX path of myFile & "\""
               log theCmd
               set grepResult to ""
               set grepResult to do shell script theCmd
               if length of grepResult > 1 then
                    set fileVersion to (characters -1 thru -1 of grepResult) as string
               end if
          end if
     end if
     return fileVersion
end parseFileType
penyfaiAuthor
Known Participant
July 31, 2009

Cheers Eric.

I've only been scripting for a few months and have never used grep so this is a great subroutine for me to disect.

I've taken a look at your site too, good idea for opening files in the correct version until happy to convert. Unfortunately, we use a big bang approach to cutovers/upgrades so won't need it.

I really appreciate all responses to my (sometimes daft) posts though.

Andrew

Inspiring
July 30, 2009

Sorry, bloody email filters again!

This is what I tried to post:

- can Finder find that? In Windows, I can search for .indd files containing "CreatorTool>Adobe InDesign 5.0" and it returns all CS3 files. It might take some time, though, if there are 2000 large files to trawl through.]]>

Noel

Kasyan Servetsky
Brainiac
July 30, 2009

tell application "Finder"
set myFolder to choose folder with prompt "Choose a Folder"
set myCS3_Files to every file in myFolder whose file type is "IDd5"
set myCS2_Files to every file in myFolder whose file type is "IDd4"
set myCS_Files to every file in myFolder whose file type is "IDd3"
end tell

penyfaiAuthor
Known Participant
July 30, 2009

Thanks to both Kasyan and Noel.

I've opted for the finder solution as it will be much quicker.

I have been able to list the CS2 files now, but for some reason the "IDd5" call is not finding any files. Not too concerned as it is the CS2 files that I need to identify.

Cheers both. Good people like yourselves make this forum so good

penyfaiAuthor
Known Participant
July 30, 2009

Kasyan - just to let you know, the IDd5 bit does work, but the test file I copied registered as a TEXT file for some reason, even though it had ".indd" extension.

Don't you just love computers!

Thanks again

Andrew

Inspiring
July 30, 2009

In the file metadata, the version is called - can Finder find that? In Windows, I can search for .indd files containing "CreatorTool>]]>Adobe InDesign 5.0" and it returns all CS3 files. It might take some time, though, if there are 2000 large files to trawl through.

Noel