Copy file name above
If I have a long list of files:
ABob.pdf
a.tiff
BTom.pdf
b.tiff
CSam.pdf
c.tiff
How do I copy the PDF file name to the TIFF file name? I would essentially be copying one file name to the other a bunch of times.
ABob.pdf
a.tiff
BTom.pdf
b.tiff
CSam.pdf
c.tiff
How do I copy the PDF file name to the TIFF file name? I would essentially be copying one file name to the other a bunch of times.
Reply to #1:
Here is how you can do it:
Add all the PDF files
Add the List method and click the Populate List button. This fills the text box with the names of the files in the list.
Remove all the PDF files again
Add all the TIFF files
Verify the names in the New Names column before starting the batch
Remember the Apply To dropdown of the List method should be set to Name
Also, this only works if the order of files are the same for both PDF and TIFF files.
Here is how you can do it:
Add all the PDF files
Add the List method and click the Populate List button. This fills the text box with the names of the files in the list.
Remove all the PDF files again
Add all the TIFF files
Verify the names in the New Names column before starting the batch
Remember the Apply To dropdown of the List method should be set to Name
Also, this only works if the order of files are the same for both PDF and TIFF files.
Reply to #2:
Hi Joshua,
Here's another way to do it. It takes less steps once you set up and save the batch, no swapping files in and out. You still have to have the files sorted in a certain order; in this case, with the .pdf just above the corresponding .tiff file. If you do this a lot this *might* be a better way; if it's a one-shot Kim's method is probably the way to go.
In a blank ARen method list add a script method. Copy and paste this in:
// ------------------------------------
// MAKE SURE YOUR FILES ARE SORTED WITH THE PDF JUST ABOVE
// THE TIFF YOU WANT TO RENAME.
n = item.newBasename;
e = item.ext ;
i = item.index ;
if ( i > 0 ) {
if ( e == ".tiff" ) {
n = app.prevItem.name ;
}
}
return n + e ;
// ------------------------------------
(Be sure to click on the "Apply script" button)
Add your files, order them correctly and you get this:
https://drive.google.com/file/d/1sDn4_QL53nTNtrBoCtBXxR4UQhD E6z_s/view?usp=sharing
(notice I had to reverse-sort the filenames to get these to work).
Best,
DF
Hi Joshua,
Here's another way to do it. It takes less steps once you set up and save the batch, no swapping files in and out. You still have to have the files sorted in a certain order; in this case, with the .pdf just above the corresponding .tiff file. If you do this a lot this *might* be a better way; if it's a one-shot Kim's method is probably the way to go.
In a blank ARen method list add a script method. Copy and paste this in:
// ------------------------------------
// MAKE SURE YOUR FILES ARE SORTED WITH THE PDF JUST ABOVE
// THE TIFF YOU WANT TO RENAME.
n = item.newBasename;
e = item.ext ;
i = item.index ;
if ( i > 0 ) {
if ( e == ".tiff" ) {
n = app.prevItem.name ;
}
}
return n + e ;
// ------------------------------------
(Be sure to click on the "Apply script" button)
Add your files, order them correctly and you get this:
https://drive.google.com/file/d/1sDn4_QL53nTNtrBoCtBXxR4UQhD E6z_s/view?usp=sharing
(notice I had to reverse-sort the filenames to get these to work).
Best,
DF