Copy link to clipboard
Copied
Hi friends,
how can i copy the all image from the folder and save in different folder.
Thank you,
[ nav ]
Hi,
var destFolder = '~/Desktop/myDest/'; // your 'my Folder'
var picNames = []; //array of names of copied images
var path_Name = '~/Desktop/mySource/';
var myPics = Folder(path_Name).getFiles('*.*'); //list files in folder
var countFiles = myPics.length;
while(countFiles--){
picName = myPics[countFiles].name;
picNames.push(picName);
myPics[countFiles].copy(File(destFolder + picName))
}
Hope it'll work
Copy link to clipboard
Copied
Hi,
mac or win? and how is ID involved¿
Hans-Gerd Claßen
Copy link to clipboard
Copied
Hi,
Below code to get the image sequence folder path.
Using the folder pathname , save all image in my diff folder.
and also id need every image name also.
var doc = app.activeDocument;
for (var j =0; j< doc.rectangles.length; j++) {
var nav = doc.rectangles
var nav_folder_path = nav[2][1];
}
In windows
Thank you,
[ Nav ]
Copy link to clipboard
Copied
Hi,
sorry, but your snippet doesn't clear it up for me ...
This copies a imageFile to a new Folder:
var destFolder = '~/Desktop/myDest/'
if(!Folder(destFolder).exists){Folder(destFolder).create()}
var myImageItemLink = app.activeDocument.rectangles[0].images[0].itemLink;
var myFilePath = myImageItemLink.filePath;
var myFileName = myImageItemLink.name;
var destFile = new File(destFolder + myFileName);
File(myFilePath).copy(destFile);
If your 'nav_folder_path' returns a Folder within more Imagefiles that you want to copy, then use 'getFiles()' to get a list of files, then copy them ...
Copy link to clipboard
Copied
Hi my friend,
I try creating 360 degree animation from indesign to HTML conversion.
Now i get the folder name by using the below code, inside that folder more then 50 to 80 images are there i need to save those image in my folder and also i need each image name inside the script.
var doc = app.activeDocument;
for (var j =0; j< doc.rectangles.length; j++) {
var nav = doc.rectangles
alert("Nav length "+nav.length);
for(var nav_get_name =0; nav_get_name < nav.length; nav_get_name++) { alert(nav[nav_get_name][0]+"="+nav[nav_get_name][1]);
var path_name = (nav[2][1]);
}
}
Thank you,
[ Nav ]
Copy link to clipboard
Copied
Hi,
var destFolder = '~/Desktop/myDest/'; // your 'my Folder'
var picNames = []; //array of names of copied images
var path_Name = '~/Desktop/mySource/';
var myPics = Folder(path_Name).getFiles('*.*'); //list files in folder
var countFiles = myPics.length;
while(countFiles--){
picName = myPics[countFiles].name;
picNames.push(picName);
myPics[countFiles].copy(File(destFolder + picName))
}
Hope it'll work