Copy link to clipboard
Copied
Bonjour, je travail avec un grand nombre d'image a renommer au quotidien et je souhaiterais les renommer facilement mais j'ai un soucis avec les séquences dans le workflow.
J'ai plusieurs dossier avec des fichiers qui ont besoin d'avoir le nom de dossier et un numéro de séquence a deux chiffres sauf que quand je lance le workflow avec plusieurs dossier les numéros de séquence ne reprennent pas a zero a chaque dossier et continuent, il y aurait-il un moyen de regler ce probleme?
Merci d'avance 🙂
rnmng = new MenuElement('command', 'Renaming of Files',
'at the end of Thumbnail'), rnmng.onSelect = function() {
fnctn = function(v){return v instanceof Folder}
fldrs = app.document.thumbnail.spec.getFiles(fnctn)
while(fldrs.length) {
lngth = (fls = (fldr = fldrs.shift())
.getFiles('*.tif')).length; while(fls.length)
fls.shift().rename(fldr.name + '-' + ('0'
+ (lngth - fls.length)).slice(-2) + '.tif')
}
}
Copy link to clipboard
Copied
The script from @Kukurykus in the following topic would be a good place to start, however, it may need adapting and the forum may need to understand your folder and filename structure.
https://community.adobe.com/t5/bridge-discussions/rename-multiple-files/td-p/12786213
Good luck!
Copy link to clipboard
Copied
Thank you very much i will check and try to adapt it to my work
Copy link to clipboard
Copied
It seems like in those folders you're getting bunch of new images next to already renamed?
Copy link to clipboard
Copied
So, i'll explain everything : (i'm sorry in advance my english is not really good)
I scan a lot of images everyday, i have a folder with names like : 8451, 8452, etc..
And i need the images in thoses folder to be named 8451-01 so i tried the workflow thing (rename with name of the folder, text "-", and a sequencial number starting at 1 with two digit) by selecting all the images from all the folders at once but the numbers never stop from a folder to an other. (It goes like : 8451-36 > 8452-37)
Thats where i am.
I saw your replies on the other post but its a little to technical for me, i dont really know how to use that in my case
Thank you in advance
Copy link to clipboard
Copied
The images are usually named 000084500001 for 8450 , or for 8451 000084510001
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I'm really sorry i keep adding things but with bridge i also put the files in Adobe 98, wich i could also do in photoshop but for me it seems faster in bridge, and i was trying to do all that in one motion with the worflow thing.
Now you know everything 🙂
I hope i dont bother you too much, and ty for you help
Copy link to clipboard
Copied
lngth = (fls = (fldr = Folder.selectDialog()).getFiles()).length
while(fls.length) (fle = fls.shift()).rename(fldr.name + '-'
+ ('0' + (lngth - fls.length)).slice(-2) + fle.name.slice(-4))
Copy link to clipboard
Copied
Hi, i'm sorry but i cant figure out how to make your script work for the moment, i just discovered all of this.
I'm currently reading everything that i find in the Bridge ExtendScript SDK
I will eventually make it work but for now i need more knowledge
Copy link to clipboard
Copied
Make new line of code at top:
#target bridge
and run the .jsx file with Bridge.
Copy link to clipboard
Copied
It work pretty good, but do you think its possible to Select a folder and apply the script to the files that are in the folders in the folder selected, if you know what i mean ^^ sorry my english is not very good.
Copy link to clipboard
Copied
Renaming = new MenuElement('command', 'Renaming',
'at the end of Thumbnail'), Renaming.onSelect = function() {
lngth = (fls = (thmbnl = app.document.thumbnail).spec.getFiles())
.length; while(fls.length) (fle = fls.shift()).rename(thmbnl.name
+'-'+('0' + (lngth - fls.length)).slice(-2) + fle.name.slice(-4))
}
Save it to 'C:\Program Files\Common Files\Adobe\Startup Scripts CC\Adobe Bridge 2022'
and launch Bridge. You should be just once informed of added script at start of new session. To use it open the folder and in empty space or any visible thumbnail click with right mouse button to choose last 'Renaming' item from end of fly-out menu.
Copy link to clipboard
Copied
Hi, thank you so much for your time and your effort and hard work, i really appreciate your help
but i still have problems 😕
like in the screenshot i have a bunch of files in a bunch of different folder, it can be 2 folder some days or maybe 200 it depends of the work charge we have, when there is 2 its ok i have a semi automatic way of renaming the files but 200 takes a long time to do. ( I can rename the files in a folder automatically with a command with my wacom tablet but i still have to select the folders manually )
Your script works but only for one folder and it start the first file with "-02"
Do you have a way i could do this automatically for all the files in all the folders that are in "01_EN COURS" ?
The folder are already rename, i just need the files to have the folder's name with a sequence startint from "-01" and reseting between folders
Copy link to clipboard
Copied
rnmng = new MenuElement('command', 'Renaming of Files',
'at the end of Thumbnail'), rnmng.onSelect = function() {
fnctn = function(v){return v instanceof Folder}
fldrs = app.document.thumbnail.spec.getFiles(fnctn)
while(fldrs.length) {
lngth = (fls = (fldr = fldrs.shift())
.getFiles('*.tif')).length; while(fls.length)
fls.shift().rename(fldr.name + '-' + ('0'
+ (lngth - fls.length)).slice(-2) + '.tif')
}
}
Copy link to clipboard
Copied
THANK YOU SO MUCH, i've been scrugling with this for so much time.
its beautiful, you're the best
you made me gain so much time.
❤️
Copy link to clipboard
Copied
I was just wondering, do you have a website or a book or something that i can read to learn how to use javascript with adobe applications ?
Copy link to clipboard
Copied
Follow me on forum to learn new stuff 😉
Copy link to clipboard
Copied
Maybe i'm asking for too much but do you think its possible to put the files in adobe 98, 300 Dpi ? I use workflow in bridge, it work great but if i could do everything in one motion, it would be so cool
Copy link to clipboard
Copied
I don't know how to do it just in Bridge, so without opening them in Photoshop.