Rename multiple files inside compressed folders

I there a way I can add the name of a zipped parent folder to the files inside ?

For instance folder name is AAA, file inside should be renamed to AAA and sequentially if there are more files of the same type the zipped folder.

I need to do this in a lot of zipped folders

Thank you

Are you creating new archives, or adding things to an existing archive? (If existing, what happens if there's a clash?)

Is the plan to select individual files, then rename the files to their parent directories (including extensions, or preserving them?) when zipping? Or is the aim to select a folder, but then do different things depending on the number of files inside the selected folder?

Files are already inside the compressed folder just want to rename these file the same name of the folder's and as some folders have more than one file of the same kind in them, that these files inherit the folder name sequentially.

These are vectors, plugins and textures for Illustrator, photoshop and 3d programs, lots of them main reason is that when I unzip them they have the same name of the parent folder so that I know what they are if it makes sense

If you click the arrow on the right of the New Name field in the Rename dialog, one of the things it can insert is the parent folder name.

That works both inside and outside of archives:

You may find batch renaming inside of archives slow if the archives are large. If so, it may be faster to extract the archives (or at least the files to be renamed), rename them all, then add them back.

I'm trying to do it but in this case I have to select all the files inside the zippped folders, right, is there a way I can just select the zipped folder and rename the files inside it ?

I guess another option would be to do a search for files inside the zipped folders and batch rename them in the search results window can Dopus do it ?

Zip files don't have many files inside, from 3 to 5 or 6 max but there are hundreds of them.

If you look at screen on the left lister there's the parent folder on the right lister the contents of it the zipped files the jpg's I've already renamed but in the rename preview window I don't think it will be renaming the contents of the zipped folder will it ? tbh I haven't tried it yet

I don't think extracting renaming the files and zipping them back again is an option because if I extract all the files in just one folder with dozens of zipped files it won't be possible to zip back again the files to the corresponding zip file, right ?

You could use Tools > Find Files to get a list of all the things you want to rename from within the archives, then rename from there.

I'd try on a backup copy of some files first, in case things go wrong and make a mess. (I'd make a backup either way.)

I think I'm almost there, managed to rename the first file in the list, now how do I rename all the others ?

And if there is more than one .eps file in the zip folder will it rename sequentially ?

Got it, instead of wildcard I chose regular expressions and that did it

Thank you

Still trying to improve

I am now trying to number the files inside the folders

Example

I have 30 folders, inside each folder between 20 to 30 files how can I batch number these files in a way that it limits the numbers to each folder's files ie I want each folder's files to start from 1 to whatever number is the last file in the folder.
I've managed to do it but it just doesn't take into account different folders it just adds numbers sequentially to every file from those folders, like from 1 to 400 or 500.
Bit confusing hope you understand

There is a rename script to do that but I am not sure if it will work inside archives. It may be possible to make it work (using some things which were added to Opus scripting after the script was written; the script is quite old), but I suspect the script would need to be changed at least a bit.

If you're renaming hundreds of files within archives, are you not finding it quite slow? I would expect it to be, as we have not optimised mass-renaming to work within archives. (It should work, but it will rename one file at a time, and isn't a common use-case that we've made explicit optimisations for, at least yet.) If you're running into other restrictions with renaming inside archives then I'd definitely consider extracting them, doing the rename(s), then re-creating the archives. It will likely end up being faster that way as well as giving you more flexibility.

Edit: This is the script, and it definitely won't work with archives at the moment as it uses native VBScript functions to check if the files already exist, and they don't know about archives. Re-writing it to use Opus functions (FSUtil.Exists) may make it work, but I would not expect it to be very fast inside an archive.

Thank you

will look it over and see if I can do it

I didn't find it slow I searched for all files inside sub folders and archives then renamed them to the parents's folder name as you can see in the screens above and in some cases I selected multiple zipped files with 100's of files and the renaming was very fast indeed, just a few seconds, mind you my machine can go up to 4.6ghz on quadcores HT if needed but I recall it did not use much cpu power to do it (I can see it on the kb's lcd)

In this case now I don't want to rename these files again, I just want to number them as I have pdf catalogues of the files and if I give each file the number of file, page and catalogue number it'll be much easier to find and import the image I need from within the vector programs I use