Article View: adobe.scripting.indesign
Article #538Re: js Is it possible to change file names of the folder with ES (like with AS)
From: erkki_pennanen
Date: Fri, 13 Mar 2009 05:08
Date: Fri, 13 Mar 2009 05:08
20 lines
1071 bytes
1071 bytes
Dave,
Thanks about information. I checked the Tools Guide and made the following quick test
... and it works!
var myFile = File("~/Desktop/MyFolder/presentName.txt");
myFile.rename("newName.txt");
newName = myFile.name ;
alert(newName);
var myFolder = Folder("~/Desktop/MyFolder/Items/");
fileList= myFolder.getFiles();
myFileName = fileList[0].name ;
alert(myFileName);
Thank you very much, Dave!
regards
Erkki
Technical Details
Message-ID:
<59b83248.1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b83248.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,2c3ecbb9af1c5b43 X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: erkki_pennanen@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: js Is it possible to change file names of the folder with ES (like with AS) Message-ID: <59b83248.1@webcrossing.la2eafNXanI> Date: Thu, 12 Mar 2009 22:08:07 -0700 References: <59b83248.-1@webcrossing.la2eafNXanI> Lines: 21 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit