Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Renommage grosse quantité

Community Beginner ,
Apr 01, 2022 Apr 01, 2022

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 🙂

TOPICS
Batch , Import and export , Scripting
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 05, 2022 Apr 05, 2022

 

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')
	}
}

 

Translate
Community Expert ,
Apr 01, 2022 Apr 01, 2022

@Arka Laboratoire 

 

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 01, 2022 Apr 01, 2022

Thank you very much i will check and try to adapt it to my work 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 01, 2022 Apr 01, 2022

It seems like in those folders you're getting bunch of new images next to already renamed?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 01, 2022 Apr 01, 2022

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 01, 2022 Apr 01, 2022

The images are usually named 000084500001 for 8450 , or for 8451 000084510001

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 01, 2022 Apr 01, 2022

And for everything to be all clear, the folder are usually created with a name like : 00008451 but i simply created a command with my wacom tablet and run it like 10 times, it work pretty good 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 01, 2022 Apr 01, 2022

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 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 01, 2022 Apr 01, 2022
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))
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 04, 2022 Apr 04, 2022

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 04, 2022 Apr 04, 2022

Make new line of code at top:

 

#target bridge

 

and run the .jsx file with Bridge.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 04, 2022 Apr 04, 2022

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.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 04, 2022 Apr 04, 2022

 

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 05, 2022 Apr 05, 2022

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

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 05, 2022 Apr 05, 2022

 

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')
	}
}

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 05, 2022 Apr 05, 2022

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.

❤️

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 05, 2022 Apr 05, 2022

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 ? 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 05, 2022 Apr 05, 2022

Follow me on forum to learn new stuff 😉

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 05, 2022 Apr 05, 2022

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

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 05, 2022 Apr 05, 2022
LATEST

I don't know how to do it just in Bridge, so without opening them in Photoshop.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines