Rename specific subfolder the same as main folder

Bulk Rename Utility How-To's

Rename specific subfolder the same as main folder

Postby Noteworthy » Fri Mar 25, 2022 5:02 pm

Hello,

Several years ago I imported family album pictures into Powerpoint in order to view them as a slide show.
Today I no longer need to do so as there are suitable alternative means available to view them on the TV or other display devices.

I wish to extract those pictures and place them in folders to conform to my present archival structure.

To extract the pictures from Powerpoint I have changed the extension from *.ppt to *.zip (thanks BRU!).
For each zipped folder, when I "Extract All" I get an unzipped folder of the same name in the same location.

Example of Unzipped folder structure:
? 20020331_Cap Ferrat France (main) with the following sub folders
_rels (sub)
docProps (sub)
> ppt
_rels
media
> slideLayouts
> slideMasters
> Slides
Theme

The sub-folder nomenclature and structure are constant as above for all unzipped folders.

I need to rename the subfolder "media" the same as the main folder and move it to its destination eg."C:\Users\username\Pictures\"

Is there any way BRU can help me achieve this? I have hundreds of Powerpoint files and it's very time-consuming to do this manually.

Many thanks in advance.
Noteworthy
 
Posts: 7
Joined: Mon Jun 22, 2020 3:13 pm

Re: Rename specific subfolder the same as main folder

Postby therube » Thu Mar 31, 2022 6:21 pm

I'll just note...

With 7-Zip (I've only ever used the command-line version), you can do something like:

7-zip.exe x *.zip Media -o* Media

That will extract only the Media directory (& its subdirectories), output to a directory of the original ZIP's filename, with the extracted Media files as a subdirectory therein.

So if you have...

BRU_NoInstall_3430 (Bulk Rename Utility).zip

which has a directory structure like:

Code: Select all
   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2021-03-11 13:26:16 D....            0            0  32-bit
2021-03-16 13:35:52 ....A     14818752      5776031  32-bit\Bulk Rename Utility.exe
2021-03-11 13:26:16 D....            0            0  64-bit
2021-03-16 13:38:28 ....A     19786176      7518353  64-bit\Bulk Rename Utility.exe
2021-03-11 13:26:18 D....            0            0  All
2021-03-16 13:06:04 ....A       732972       666310  All\BRU_Manual.pdf
2021-03-16 12:22:08 ....A        73162        70578  All\BRUChangelog.pdf
2021-02-03 10:07:00 ....A       101312        55749  All\BRUHere.dll
2021-02-03 10:07:18 ....A       126912        65953  All\BRUHere64.dll
2021-03-16 13:05:04 ....A       197464       190453  All\Bulk Rename Utility.chm
2021-01-28 11:51:48 ....A            2            2  All\Bulk Rename Utility.ini
2021-03-11 13:26:18 D....            0            0  All\js
2016-01-06 16:06:00 .R..A        38179        14046  All\js\date.js
2016-01-06 16:04:46 .R..A        61638        25102  All\js\sugar.js
2016-01-06 16:18:40 ....A         5185         2272  All\License.rtf
2016-01-06 15:59:18 ....A         4496         2037  All\License.txt
2016-01-06 15:51:06 ....A         1808          941  All\Tips.txt
2019-10-22 14:27:30 ....A         1124          391  NoInstall-Readme.txt
2021-03-11 13:26:18 D....            0            0  Vista-XP-2003
2019-09-13 18:05:10 .R..A     14549064      5512758  Vista-XP-2003\Bulk Rename Utility.exe
------------------- ----- ------------ ------------  ------------------------


7-zip.exe x *.zip All -o* All

Will extract the /All/ directory (& subdirectories of it) to a subdirectory named (in this case) "BRU_NoInstall_3430 (Bulk Rename Utility)":

Code: Select all
C:.
|   BRU_NoInstall_3430 (Bulk Rename Utility).zip
|   
\---BRU_NoInstall_3430 (Bulk Rename Utility)
    \---All
        |   BRUChangelog.pdf
        |   BRUHere.dll
        |   BRUHere64.dll
        |   BRU_Manual.pdf
        |   Bulk Rename Utility.chm
        |   Bulk Rename Utility.ini
        |   License.rtf
        |   License.txt
        |   Tips.txt
        |   
        \---js
                date.js
                sugar.js



Similarly if a .ppt is a .zip, 7-zip should be able to handle it - without renaming it, first.
(I'll assume the 7-zip GUI should be able to do all of this also, though I've never used it.)

(In my example, I've used /All/ rather then /Media/, cause that's what I had on hand, what was in the .zip I had.)


So if you have 1,001 .ppt in a directory, running a command similar to above, should extract all the /Media/ contents from each, placing each into a subdirectory named the same as the .zip (.ppt) [without the extension].
therube
 
Posts: 1310
Joined: Mon Jan 18, 2016 6:23 pm

Re: Rename specific subfolder the same as main folder

Postby Noteworthy » Sat Jun 11, 2022 10:02 am

I've only just seen your response as I received no alert that you had done so.
I am very grateful for your help.
Many, many thanks
Noteworthy
 
Posts: 7
Joined: Mon Jun 22, 2020 3:13 pm


Return to How-To