Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Apple » Apple II » Utility to change file type on ProDOS
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Utility to change file type on ProDOS [message #386900] Tue, 10 September 2019 21:57 Go to next message
Anonymous
Karma:
Originally posted by: Bobbi

Does anyone know of a utility to change the file type byte of a file on ProDOS?
None of my usual tools (ProSel, Copy2Plus etc.) have anything that does this.

It should be pretty easy to do by using a sector editor on the directory but it would be nice to have a safer tool :)
Re: Utility to change file type on ProDOS [message #386903 is a reply to message #386900] Tue, 10 September 2019 23:10 Go to previous messageGo to next message
Dave Touvell is currently offline  Dave Touvell
Messages: 17
Registered: August 2013
Karma: 0
Junior Member
On Tuesday, September 10, 2019 at 9:57:50 PM UTC-4, Bobbi wrote:
> Does anyone know of a utility to change the file type byte of a file on ProDOS?
> None of my usual tools (ProSel, Copy2Plus etc.) have anything that does this.
>
> It should be pretty easy to do by using a sector editor on the directory but it would be nice to have a safer tool :)

If you have a IIGS, I'm pretty sure Karl Bunker's File-A-Trix CDA does it. It's on the Bunkerware Disk at https://ftp.apple.asimov.net/images/gs/misc/BunkerWare.SDK

For ProDOS 8, the only one I can think of is FAZ (File Attribute Zapper). It seems a little harder to come by, but I found a bsq file for it at https://mirrors.apple2.org.za/apple2.archive.umich.edu/apple 2/8bit/util/fazz.2.3.bsq

I'm sure there are others, especially for the GS. Seems like I remember a File Info or File Manager NDA that would change the types.

-Dave
Re: Utility to change file type on ProDOS [message #386904 is a reply to message #386903] Tue, 10 September 2019 23:13 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Bobbi

On Tuesday, 10 September 2019 23:10:24 UTC-4, Dave Touvell wrote:
> On Tuesday, September 10, 2019 at 9:57:50 PM UTC-4, Bobbi wrote:
>> Does anyone know of a utility to change the file type byte of a file on ProDOS?
>> None of my usual tools (ProSel, Copy2Plus etc.) have anything that does this.
>>
>> It should be pretty easy to do by using a sector editor on the directory but it would be nice to have a safer tool :)
>
> If you have a IIGS, I'm pretty sure Karl Bunker's File-A-Trix CDA does it. It's on the Bunkerware Disk at https://ftp.apple.asimov.net/images/gs/misc/BunkerWare.SDK
>
> For ProDOS 8, the only one I can think of is FAZ (File Attribute Zapper). It seems a little harder to come by, but I found a bsq file for it at https://mirrors.apple2.org.za/apple2.archive.umich.edu/apple 2/8bit/util/fazz.2.3.bsq
>
> I'm sure there are others, especially for the GS. Seems like I remember a File Info or File Manager NDA that would change the types.
>
> -Dave

I just found out about FAZ from this URL:
https://stason.org/TULARC/pc/apple2/faq/10-009-Which-program s-can-change-ProDOS-filetype.html

Thanks for digging it up for me. I will give it a go :)
Re: Utility to change file type on ProDOS [message #386905 is a reply to message #386904] Tue, 10 September 2019 23:14 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Bobbi

On Tuesday, 10 September 2019 23:13:03 UTC-4, Bobbi wrote:
> On Tuesday, 10 September 2019 23:10:24 UTC-4, Dave Touvell wrote:
>> On Tuesday, September 10, 2019 at 9:57:50 PM UTC-4, Bobbi wrote:
>>> Does anyone know of a utility to change the file type byte of a file on ProDOS?
>>> None of my usual tools (ProSel, Copy2Plus etc.) have anything that does this.
>>>
>>> It should be pretty easy to do by using a sector editor on the directory but it would be nice to have a safer tool :)
>>
>> If you have a IIGS, I'm pretty sure Karl Bunker's File-A-Trix CDA does it. It's on the Bunkerware Disk at https://ftp.apple.asimov.net/images/gs/misc/BunkerWare.SDK
>>
>> For ProDOS 8, the only one I can think of is FAZ (File Attribute Zapper). It seems a little harder to come by, but I found a bsq file for it at https://mirrors.apple2.org.za/apple2.archive.umich.edu/apple 2/8bit/util/fazz.2.3.bsq
>>
>> I'm sure there are others, especially for the GS. Seems like I remember a File Info or File Manager NDA that would change the types.
>>
>> -Dave
>
> I just found out about FAZ from this URL:
> https://stason.org/TULARC/pc/apple2/faq/10-009-Which-program s-can-change-ProDOS-filetype.html
>
> Thanks for digging it up for me. I will give it a go :)

Looking for the //e ideally, I forgot to say. But there is always the emulator if there is only a GS way to do this. I am surprised this was not more widely implemented - half the reason ppl use ShrinkIt is so the filetypes don't get messed up ;) (And same on Classic Mac, if I recall too.)
Re: Utility to change file type on ProDOS [message #386906 is a reply to message #386905] Tue, 10 September 2019 23:26 Go to previous messageGo to next message
Dave Touvell is currently offline  Dave Touvell
Messages: 17
Registered: August 2013
Karma: 0
Junior Member
On Tuesday, September 10, 2019 at 11:14:31 PM UTC-4, Bobbi wrote:
> On Tuesday, 10 September 2019 23:13:03 UTC-4, Bobbi wrote:
>> On Tuesday, 10 September 2019 23:10:24 UTC-4, Dave Touvell wrote:
>>> On Tuesday, September 10, 2019 at 9:57:50 PM UTC-4, Bobbi wrote:
>>>> Does anyone know of a utility to change the file type byte of a file on ProDOS?
>>>> None of my usual tools (ProSel, Copy2Plus etc.) have anything that does this.
>>>>
>>>> It should be pretty easy to do by using a sector editor on the directory but it would be nice to have a safer tool :)
>>>
>>> If you have a IIGS, I'm pretty sure Karl Bunker's File-A-Trix CDA does it. It's on the Bunkerware Disk at https://ftp.apple.asimov.net/images/gs/misc/BunkerWare.SDK
>>>
>>> For ProDOS 8, the only one I can think of is FAZ (File Attribute Zapper). It seems a little harder to come by, but I found a bsq file for it at https://mirrors.apple2.org.za/apple2.archive.umich.edu/apple 2/8bit/util/fazz.2.3.bsq
>>>
>>> I'm sure there are others, especially for the GS. Seems like I remember a File Info or File Manager NDA that would change the types.
>>>
>>> -Dave
>>
>> I just found out about FAZ from this URL:
>> https://stason.org/TULARC/pc/apple2/faq/10-009-Which-program s-can-change-ProDOS-filetype.html
>>
>> Thanks for digging it up for me. I will give it a go :)
>
> Looking for the //e ideally, I forgot to say. But there is always the emulator if there is only a GS way to do this. I am surprised this was not more widely implemented - half the reason ppl use ShrinkIt is so the filetypes don't get messed up ;) (And same on Classic Mac, if I recall too.)

That's a good list... I forgot about Change-A-File. That's another P8 one. It might be found on a disk with another of Harold Portnoy's utilities called Resurrection. they're both aimed towards Appleworks files, if I remember correctly, but Change-A-File should work on any ProDOS file type.
Re: Utility to change file type on ProDOS [message #386907 is a reply to message #386905] Tue, 10 September 2019 23:27 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Bobbi

On Tuesday, 10 September 2019 23:14:31 UTC-4, Bobbi wrote:
> On Tuesday, 10 September 2019 23:13:03 UTC-4, Bobbi wrote:
>> On Tuesday, 10 September 2019 23:10:24 UTC-4, Dave Touvell wrote:
>>> On Tuesday, September 10, 2019 at 9:57:50 PM UTC-4, Bobbi wrote:
>>>> Does anyone know of a utility to change the file type byte of a file on ProDOS?
>>>> None of my usual tools (ProSel, Copy2Plus etc.) have anything that does this.
>>>>
>>>> It should be pretty easy to do by using a sector editor on the directory but it would be nice to have a safer tool :)
>>>
>>> If you have a IIGS, I'm pretty sure Karl Bunker's File-A-Trix CDA does it. It's on the Bunkerware Disk at https://ftp.apple.asimov.net/images/gs/misc/BunkerWare.SDK
>>>
>>> For ProDOS 8, the only one I can think of is FAZ (File Attribute Zapper). It seems a little harder to come by, but I found a bsq file for it at https://mirrors.apple2.org.za/apple2.archive.umich.edu/apple 2/8bit/util/fazz.2.3.bsq
>>>
>>> I'm sure there are others, especially for the GS. Seems like I remember a File Info or File Manager NDA that would change the types.
>>>
>>> -Dave
>>
>> I just found out about FAZ from this URL:
>> https://stason.org/TULARC/pc/apple2/faq/10-009-Which-program s-can-change-ProDOS-filetype.html
>>
>> Thanks for digging it up for me. I will give it a go :)
>
> Looking for the //e ideally, I forgot to say. But there is always the emulator if there is only a GS way to do this. I am surprised this was not more widely implemented - half the reason ppl use ShrinkIt is so the filetypes don't get messed up ;) (And same on Classic Mac, if I recall too.)

So, errr, is there an easy way to extract a BSQ file? Otherwise I may just try to educate myself on the format of ProDOS directories and throw something together myself in Merlin, or Aztec C maybe.

Seems there is a tool called sciibin that extracts BSQ file and I did find an ancient source code listing of that tool in C (old enough that the email address says 'UUCP'). I could give that a whirl, but seems like a case where it may be easier to do it myself (and more educational.)
Re: Utility to change file type on ProDOS [message #386909 is a reply to message #386907] Wed, 11 September 2019 00:02 Go to previous messageGo to next message
Dave Touvell is currently offline  Dave Touvell
Messages: 17
Registered: August 2013
Karma: 0
Junior Member
On Tuesday, September 10, 2019 at 11:27:55 PM UTC-4, Bobbi wrote:
> On Tuesday, 10 September 2019 23:14:31 UTC-4, Bobbi wrote:
>> On Tuesday, 10 September 2019 23:13:03 UTC-4, Bobbi wrote:
>>> On Tuesday, 10 September 2019 23:10:24 UTC-4, Dave Touvell wrote:
>>>> On Tuesday, September 10, 2019 at 9:57:50 PM UTC-4, Bobbi wrote:
>>>> > Does anyone know of a utility to change the file type byte of a file on ProDOS?
>>>> > None of my usual tools (ProSel, Copy2Plus etc.) have anything that does this.
>>>> >
>>>> > It should be pretty easy to do by using a sector editor on the directory but it would be nice to have a safer tool :)
>>>>
>>>> If you have a IIGS, I'm pretty sure Karl Bunker's File-A-Trix CDA does it. It's on the Bunkerware Disk at https://ftp.apple.asimov.net/images/gs/misc/BunkerWare.SDK
>>>>
>>>> For ProDOS 8, the only one I can think of is FAZ (File Attribute Zapper). It seems a little harder to come by, but I found a bsq file for it at https://mirrors.apple2.org.za/apple2.archive.umich.edu/apple 2/8bit/util/fazz.2.3.bsq
>>>>
>>>> I'm sure there are others, especially for the GS. Seems like I remember a File Info or File Manager NDA that would change the types.
>>>>
>>>> -Dave
>>>
>>> I just found out about FAZ from this URL:
>>> https://stason.org/TULARC/pc/apple2/faq/10-009-Which-program s-can-change-ProDOS-filetype.html
>>>
>>> Thanks for digging it up for me. I will give it a go :)
>>
>> Looking for the //e ideally, I forgot to say. But there is always the emulator if there is only a GS way to do this. I am surprised this was not more widely implemented - half the reason ppl use ShrinkIt is so the filetypes don't get messed up ;) (And same on Classic Mac, if I recall too.)
>
> So, errr, is there an easy way to extract a BSQ file? Otherwise I may just try to educate myself on the format of ProDOS directories and throw something together myself in Merlin, or Aztec C maybe.
>
> Seems there is a tool called sciibin that extracts BSQ file and I did find an ancient source code listing of that tool in C (old enough that the email address says 'UUCP'). I could give that a whirl, but seems like a case where it may be easier to do it myself (and more educational.)

I think either BINSCII or BLU programs will convert to ShrinkIt file. If all else fails, use GSCII+ NDA in an emulator.
Re: Utility to change file type on ProDOS [message #386910 is a reply to message #386907] Wed, 11 September 2019 00:42 Go to previous messageGo to next message
Hugh Hood is currently offline  Hugh Hood
Messages: 678
Registered: November 2012
Karma: 0
Senior Member
On Tuesday, September 10, 2019 at 9:57:50 PM UTC-4, Bobbi wrote:

>
> Does anyone know of a utility to change the file type byte of a file
> on ProDOS? None of my usual tools (ProSel, Copy2Plus etc.) have
> anything that does this.
>

For ProDOS 8, some of the choices are:

1. ProTERM 3.1 (changes both Filetype and Auxtype)
2. AppleWorks 5.1 (changes just Filetype)
3. TimeOut WherzIt? (changes both Filetype and Auxtype)





Hugh Hood
Re: Utility to change file type on ProDOS [message #386911 is a reply to message #386910] Wed, 11 September 2019 01:09 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Bobbi

On Wednesday, 11 September 2019 00:42:48 UTC-4, Hugh Hood wrote:
> On Tuesday, September 10, 2019 at 9:57:50 PM UTC-4, Bobbi wrote:
>
>>
>> Does anyone know of a utility to change the file type byte of a file
>> on ProDOS? None of my usual tools (ProSel, Copy2Plus etc.) have
>> anything that does this.
>>
>
> For ProDOS 8, some of the choices are:
>
> 1. ProTERM 3.1 (changes both Filetype and Auxtype)
> 2. AppleWorks 5.1 (changes just Filetype)
> 3. TimeOut WherzIt? (changes both Filetype and Auxtype)
>
>
>
>
>
> Hugh Hood

I am hacking something together in Aztec C, just cos :)

It is good to know ProTerm 3.1 can do this though. It is also a reasonable text editor. Truly a useful swiss army knife.
Re: Utility to change file type on ProDOS [message #386912 is a reply to message #386911] Wed, 11 September 2019 01:18 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Bobbi

On Wednesday, 11 September 2019 01:09:05 UTC-4, Bobbi wrote:
> On Wednesday, 11 September 2019 00:42:48 UTC-4, Hugh Hood wrote:
>> On Tuesday, September 10, 2019 at 9:57:50 PM UTC-4, Bobbi wrote:
>>
>>>
>>> Does anyone know of a utility to change the file type byte of a file
>>> on ProDOS? None of my usual tools (ProSel, Copy2Plus etc.) have
>>> anything that does this.
>>>
>>
>> For ProDOS 8, some of the choices are:
>>
>> 1. ProTERM 3.1 (changes both Filetype and Auxtype)
>> 2. AppleWorks 5.1 (changes just Filetype)
>> 3. TimeOut WherzIt? (changes both Filetype and Auxtype)
>>
>>
>>
>>
>>
>> Hugh Hood
>
> I am hacking something together in Aztec C, just cos :)
>
> It is good to know ProTerm 3.1 can do this though. It is also a reasonable text editor. Truly a useful swiss army knife.

This scrap of beautiful K&R C does the trick in Aztec C 3.2 on the //e:

/* Change type of a ProDOS file */

#include <stdio.h>
#include <prodos.h>

int main(argc, argv)
int argc;
char *argv[];
{
struct finfo fi;
if (argc != 2) {
puts("usage: chtype filename");
return 1;
}
if (getfinfo(argv[1], &fi) == -1) {
puts("getfinfo() error");
return 1;
}

printf("Type of file %s is %d, aux %d\n",
argv[1], fi.file_type, fi.aux_type);

fi.file_type = 0xff; /* SYS */
fi.aux_type = 0x00;

printf("Changing type to %d, aux %d\n", fi.file_type, fi.aux_type);

if (setfinfo(argv[1], &fi) == -1) {
puts("setfinfo() error");
return 1;
}
puts("Thank you, come again!");
return 0;
}
Re: Utility to change file type on ProDOS [message #386915 is a reply to message #386912] Wed, 11 September 2019 02:06 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: inexorabletash

ProDOS BI extended command:

https://github.com/inexorabletash/chtype

Disk image under "Releases" link.
Utility to change file type on ProDOS [message #386926 is a reply to message #386900] Wed, 11 September 2019 10:55 Go to previous messageGo to next message
gids.rs is currently offline  gids.rs
Messages: 1395
Registered: October 2012
Karma: 0
Senior Member
There is a good utility on Nibble disks that can change both file type and Aux type. With a short basic program, it can be made into a batch utility.

It is installed as a Prodos command but can be converted to use the ampersand.
Re: Utility to change file type on ProDOS [message #386929 is a reply to message #386926] Wed, 11 September 2019 12:01 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Bobbi

On Wednesday, 11 September 2019 10:55:38 UTC-4, I am Rob wrote:
> There is a good utility on Nibble disks that can change both file type and Aux type. With a short basic program, it can be made into a batch utility.
>
> It is installed as a Prodos command but can be converted to use the ampersand.

I am having fun with Aztec C so that is a good enough solution for me for now. I may extend it to covert dates to-from the new ProDOS 2.5.0alpha4 format also, when I have a chance.
Re: Utility to change file type on ProDOS [message #386939 is a reply to message #386907] Wed, 11 September 2019 16:03 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: fadden

On Tuesday, September 10, 2019 at 8:27:55 PM UTC-7, Bobbi wrote:
> Seems there is a tool called sciibin that extracts BSQ file and I did find an ancient source code listing of that tool in C (old enough that the email address says 'UUCP'). I could give that a whirl, but seems like a case where it may be easier to do it myself (and more educational.)

https://fadden.com/apple2/misc.html has a copy of undoit.zip. The README says:

-----
Here are a bunch of C programs to process different kind
of files containing Apple stuff.
It is the second time I sent these out.
Just added a Makefile, fixed some bugs (mainly problems
on SUNs) and cleaned things up.

The programs are:

unbit - undoes the 6-bit executioner format.
unexec - undoes the apple2 monitor format.
unblu - view and extract from binary 2 archives.
usq - usqueeze squeezed files (created by sq3 or
extracted from binary 2 or shrinkit archives).
sciibin - view and extract form binscii files.


- Marcel marcel@...
-----

There's also the BINSCII utility that runs under ProDOS 8, and a IIgs NDA (GSCIIPLUS).

With respect to file types, Actions > Edit Attributes in CiderPress will get the job done if you're working with disk image files.
Re: Utility to change file type on ProDOS [message #386948 is a reply to message #386900] Wed, 11 September 2019 20:11 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: James Davis

On Tuesday, September 10, 2019 at 6:57:50 PM UTC-7, Bobbi wrote:
> Does anyone know of a utility to change the file type byte of a file on ProDOS?
> None of my usual tools (ProSel, Copy2Plus etc.) have anything that does this.
>
> It should be pretty easy to do by using a sector editor on the directory but it would be nice to have a safer tool :)

I am probably wrong, but IIRC, you can do it from ProDOS (also a utility) using the bload and bsave commands, setting the file- and auxiliary- types during the bsave.
Re: Utility to change file type on ProDOS [message #386950 is a reply to message #386948] Wed, 11 September 2019 20:26 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Bobbi

On Wednesday, 11 September 2019 20:11:25 UTC-4, James Davis wrote:
> On Tuesday, September 10, 2019 at 6:57:50 PM UTC-7, Bobbi wrote:
>> Does anyone know of a utility to change the file type byte of a file on ProDOS?
>> None of my usual tools (ProSel, Copy2Plus etc.) have anything that does this.
>>
>> It should be pretty easy to do by using a sector editor on the directory but it would be nice to have a safer tool :)
>
> I am probably wrong, but IIRC, you can do it from ProDOS (also a utility) using the bload and bsave commands, setting the file- and auxiliary- types during the bsave.

I guess that would work but you would probably have to keep track of the start address, length, aux type etc.
Re: Utility to change file type on ProDOS [message #386954 is a reply to message #386950] Wed, 11 September 2019 20:55 Go to previous message
Anonymous
Karma:
Originally posted by: James Davis

On Wednesday, September 11, 2019 at 5:26:14 PM UTC-7, Bobbi wrote:
> On Wednesday, 11 September 2019 20:11:25 UTC-4, James Davis wrote:
>> On Tuesday, September 10, 2019 at 6:57:50 PM UTC-7, Bobbi wrote:
>>> Does anyone know of a utility to change the file type byte of a file on ProDOS?
>>> None of my usual tools (ProSel, Copy2Plus etc.) have anything that does this.
>>>
>>> It should be pretty easy to do by using a sector editor on the directory but it would be nice to have a safer tool :)
>>
>> I am probably wrong, but IIRC, you can do it from ProDOS (also a utility) using the bload and bsave commands, setting the file- and auxiliary- types during the bsave.
>
> I guess that would work but you would probably have to keep track of the start address, length, aux type etc.

Yes, the start address, length or end address, but not the file or aux type that you are changing.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Emulate an Altair 8800 on your Apple II
Next Topic: Tool to determine sector order of disk image
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Apr 24 01:40:05 EDT 2024

Total time taken to generate the page: 0.02079 seconds