Extract File size metadata from images via Bridge script

General Discussion of Scripting for Adobe Bridge

Moderators: Tom, Kukurykus

wieble

Extract File size metadata from images via Bridge script

Post by wieble »

Elo. I am new to this scene and do not know how to write JS.

This may seem a very basic issue to many of you - but I would like to know if there is a Bridge script to extract image file size metadata to a csv file.

I have just discovered Bob Stucky's 'Export Metadata Script' & it works fantastically for my purposes of extracting other MD - except it lacks the choice of file size MD. The script itself looks too complicated for me to understand. Bob must be a bit of a legend !

I cannot find the File Size field referenced anywhere - in the Tiff Tag fields, XMP fields, IPTC or EXIF.

Would appreciate input from the experts out there.

Cheers,
wieble
Mike Hale

Extract File size metadata from images via Bridge script

Post by Mike Hale »

If by file size you mean the size when saved to media, it's not part of the metadata.

But you should be able to get it with thumbnail.spec.length

I think that value is in bytes.


Mike
wieble

Extract File size metadata from images via Bridge script

Post by wieble »

Hi Mike,

Thanks for responding so quickly.

Yes, I do mean the file size – such as the computer memory space the file takes up eg. 32MB.

Is that the same as what you were referring to?

If so, where would I place the ‘thumbnail.spec.length’ term in the script ? For example, Mike, in your script [posted on Nov 06, 2006] in response to the query about "creating a simple list of files and their resolution" – where would you insert ‘thumbnail.spec.length’ ?

Cheers,
wieble
Mike Hale

Extract File size metadata from images via Bridge script

Post by Mike Hale »

Item is a thumbnail object so you could do something like

Code: Select allf.writeln(item.name,',',(item.spec.length)/1024,',',ListMetadata(item) );
wieble

Extract File size metadata from images via Bridge script

Post by wieble »

Thank you Mike.

That worked for me - & I divided by 1024 once again so that the result was in MBs.

Thanx again!

You too are a legend!

Cheers,
wieble