can one lift a file-name without the file.extension in javascript


i suspect matter may have come before not find thread on ...
anyway: if grab filename later use

var thedoc = app.activedocument
var docname = thedoc.name

it picks original file-extension too.
is there way avoid or »substract« extension later on?

what want use saving multiple flattened cmyk-files layered rgb-psd-file same folder psd-file , appending letter-combination signify printing-conditions generated for.

as im plenty ignorant in scripting-matters appreciated.

>
> var thedoc = app.activedocument
> var docname = thedoc.name

var basename = docname.match(/(.*)\.[^\.]+$/)[1];

this choke if there no '.' character in name.

there may simpler way, off top of head.

-x
--
for photoshop scripting solutions of sorts
contact: xbytor@gmail.com


More discussions in Photoshop Scripting


adobe

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code