I'm trying to organise my BBC Micro disk images. The current folder setup goes like this (parenthesis is inside zip file):-
~/bbcg/Acornsoft/Hopper.zip (Acornsoft/Hopper.ssd)
~/bbcg/Acornsoft/Snapper.zip (Acornsoft/Snapper.ssd)
~/bbcg/Superior/Citadel.zip (Superior/Citadel.ssd)
~/bbcg/Superior/Repton.zip (Superior/Repton.ssd)
There's loads more folders and zip files, that's why a little command or script would be helpful. Is there a way to run a command or a script that would take the entire folder bbcg and output either a zip file or folder with the following heirarchy?
~/bbcg/Acornsoft/Hopper.ssd
~/bbcg/Acornsoft/Snapper.ssd
~/bbcg/Superior/Citadel.ssd
~/bbcg/Superior/Repton.ssd
or into a Zip file with a similar format:-
~/bbcg.zip (Acornsoft/Hopper.ssd)
~/bbcg.zip (Acornsoft/Snapper.ssd)
~/bbcg.zip (Superior/Citadel.ssd)
~/bbcg.zip (Superior/Repton.ssd)
So each software house has it's own folder, full of SSD "disk" files from that house...
Thanks
Karl
[SOLVED] Merging Zip Files?
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Topics in this forum are automatically closed 6 months after creation.
[SOLVED] Merging Zip Files?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Merging Zip Files?
I am not sure what that file type is (not an ssd disk ? is it..)karmafarmer wrote:Is there a way to run a command or a script that would take the entire folder bbcg and output either a zip file or folder with the following hierarchy?
- EDIT: Ok, I think I've found it ssd (single sided image files, diskette sizes !)
http://www.simplehelp.net/2008/12/15/ho ... -in-linux/
- --archive file creation/extraction utilities..
- The desktop (Linux) for Gnome or Kde, also has a zip filer (fileroller : Gnome), for example..
Kde will have something similar
--and other desktop styles as well
- To get a hierarchical archive dump on a Linux system, the default application is tar
- The desktop (Linux) for Gnome or Kde, also has a zip filer (fileroller : Gnome), for example..
This utility may work..
http://www.hjsplit.org/linux/
Also the UNIX/Linux utility cat (catenate) or copy /b (binary file) likely will be ok as well
http://www.devdaily.com/unix/edu/examples/cat.shtml
cat x1.zip, x2.zip all.zip (result file)
copy x1.zip x2.zuip xxall.zip (result file)
--or copy /b *.zip all.zip
Last edited by DrHu on Thu Jul 12, 2012 4:16 pm, edited 2 times in total.
Re: Merging Zip Files?
I'd do this by creating a new empty directory next to bbcg, called bbcgnew (so they are both subdirectories of the same directory). Then open a terminal and go to the bbcgnew directory. Then run this command:
It will find all the zip files in the bbcg directory and unzip them in the bbcgnew directory. After I run the above with your example files in ~/bbcg, it has the files in one directory per software house as you wanted:
You can then zip this however you want.
PS. Fond memories of my old BBC Acorn Electron
Code: Select all
for file in $(find ../bbcg -name *.zip); do unzip $file; done
Code: Select all
vincent@katya ~/bbcgnew $ tree
.
├── Acornsoft
│ ├── Hopper.ssd
│ └── Snapper.ssd
└── Superior
├── Citadel.ssd
└── Repton.ssd
2 directories, 4 files
PS. Fond memories of my old BBC Acorn Electron
Re: Merging Zip Files?
Thanks, Vincent!
Absolutely beautiful. Did exactly what I wanted. Hundreds of BBC Games, all sorted into folders in a second!
I love those old games, and what's crazy, my kids do too!
Thanks so much Now I'm off to retrogame...
Absolutely beautiful. Did exactly what I wanted. Hundreds of BBC Games, all sorted into folders in a second!
I love those old games, and what's crazy, my kids do too!
Thanks so much Now I'm off to retrogame...