Batch 'compacting' a bunch of .ssd DFS disc images (on Win 10 x64)

discuss PC<>Acorn file transfer issues & the use of FDC, XFER, Omniflop/disk etc.
User avatar
Arcadian
Posts: 2734
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Batch 'compacting' a bunch of .ssd DFS disc images (on Win 10 x64)

Postby Arcadian » Mon Jun 13, 2016 3:18 am

Can anybody recommend a way of reducing the file size of multiple 200k .ssd files in one hit?

I thought that bbcim should be able to do this, but it doesn't seem to like wildcards (might be a Windows thing).

bbcim -min file.ssd works but bbcim -min *.ssd fails.
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk

Image
ABug Leicestershire (17-19 November 2017)

User avatar
danielj
Posts: 5151
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: Batch 'compacting' a bunch of .ssd DFS disc images (on Win 10 x64)

Postby danielj » Mon Jun 13, 2016 5:48 am

Code: Select all

for %f in (.\*.ssd) do (bbcim -min %f)
(I think!)

d.

User avatar
Arcadian
Posts: 2734
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: Batch 'compacting' a bunch of .ssd DFS disc images (on Win 10 x64)

Postby Arcadian » Mon Jun 13, 2016 3:33 pm

"f% was unexpected at this time."

???
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk

Image
ABug Leicestershire (17-19 November 2017)

User avatar
simonm
Posts: 164
Joined: Mon May 09, 2016 2:40 pm
Contact:

Re: Batch 'compacting' a bunch of .ssd DFS disc images (on Win 10 x64)

Postby simonm » Mon Jun 13, 2016 3:49 pm

It's %f not f%.

If doing this in a batch file rather than command line, it's:


Code: Select all

for %%f in (.\*.ssd) do (bbcim -min %%f)

User avatar
Arcadian
Posts: 2734
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: Batch 'compacting' a bunch of .ssd DFS disc images (on Win 10 x64)

Postby Arcadian » Mon Jun 13, 2016 8:34 pm

Doh!

Anyway that's worked a treat, thanks Daniel, Simon.
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk

Image
ABug Leicestershire (17-19 November 2017)

User avatar
Wouter Scholten
Posts: 154
Joined: Wed May 02, 2001 10:14 pm
Location: NL
Contact:

Re: Batch 'compacting' a bunch of .ssd DFS disc images (on Win 10 x64)

Postby Wouter Scholten » Sun Apr 16, 2017 12:21 pm

Arcadian wrote:Can anybody recommend a way of reducing the file size of multiple 200k .ssd files in one hit?

I thought that bbcim should be able to do this, but it doesn't seem to like wildcards (might be a Windows thing).

bbcim -min file.ssd works but bbcim -min *.ssd fails.


In unix wildcard expansion is dealt with by the shell, so a utility doesn't see the *, it gets a list of files, unless there are no matches, in which case the * is sent as is...

So for me it would be superfluous to include any wildcard stuff unless I wanted to do something special. I might include it in a later version if I finish some code for this in my bbccom serial transfer software (for more abilities in the command interpreter) then I could add that code without much effort into bbcim.

I just made a small update to bbcim 1.0 to handle long filenames after all, as I ran into this problem on my PC directly accessing stuff in backup directories with long pathnames :) Although I normally use bbcim 1.2. Also added a little better message on using -ab instead of -a to force inclusion of files into a diskimage. (-a doesn't do this to enable you to do bbcim -a * so that non-BBC files don't get added). And I've included the postscript manual in doc/ ready made. Edit: Added pdf too.

See:
http://wouter.bbcmicro.net/bbc/bbc-pc-software.html


Return to “software & utilities for the pc, mac or unix”

Who is online

Users browsing this forum: No registered users and 1 guest