The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   Applications (http://hintsforums.macworld.com/forumdisplay.php?f=5)
-   -   Determining file type - a challenge for all you smart folks! (http://hintsforums.macworld.com/showthread.php?t=64471)

edalzell 12-07-2006 12:45 PM

Determining file type - a challenge for all you smart folks!
 
I have some files that I am told are diagrams and are from about 1991. There are no resource files (got these files from a Windows user) or forks (guess I should find ResEdit and make sure).

How can I figure out what type of files they are?

Thanks

dduggan 12-07-2006 12:58 PM

One would assume, clicking on the file and pressing Apple-i will give you the file extension...

edalzell 12-07-2006 01:03 PM

Quote:

Originally Posted by dduggan (Post 340201)
One would assume, clicking on the file and pressing Apple-i will give you the file extension...

Nope. Nuthin' there.

Carl Stawicki 12-07-2006 01:36 PM

I would first assume that since they are diagrams from Windows they are Visio files. Maybe there's a Visio viewer somewhere for the Mac. If not, you can install a demo of something like ConceptDraw and try to open them.

edalzell 12-07-2006 01:40 PM

These are Mac files, I just received them from a Windows user.

I have opened them with a hex editor and they seem like MacDraw files, as I see DRWG in them and that is the creator code for MacDraw I believe.

GraphicConverter says that it can import MacDraw I files (not sure how to tell the difference between MacDraw I and II) but it won't open this one. I will do a search on how to open MacDraw files now that I know the type.

If you have any suggestions, I would be happy to hear them.

hayne 12-07-2006 01:52 PM

If they are older files, it is quite likely that there used to be a resource fork associated with the file and that resource fork was lost when transmitted via a Windows system. The resource fork might be needed in order to open the file, so it would be best to get the files from the original Macintosh source.

Carl Stawicki 12-07-2006 01:55 PM

EasyDraw can open those.

http://www.eazydraw.com/

edalzell 12-07-2006 01:58 PM

Quote:

Originally Posted by hayne (Post 340219)
If they are older files, it is quite likely that there used to be a resource fork associated with the file and that resource fork was lost when transmitted via a Windows system. The resource fork might be needed in order to open the file, so it would be best to get the files from the original Macintosh source.

Ya, that's what I thought...I have found several apps that say they open them (EazyDraw, GraphicConverter, Intaglio), but none of them do, I think either my file is bad, or I am missing the resource fork.

Ahhhh, resource forks....

How do I get the resource fork if we only have Windows machines?

hayne 12-07-2006 02:09 PM

Quote:

Originally Posted by edalzell (Post 340222)
How do I get the resource fork if we only have Windows machines?

It's not a question of "getting" it. It's a question of whether it exists.
I.e. if you have a file "foo" on a Mac and this file has a resource fork, and you transfer that file to a Windows machine, then the resource fork might get lost (i.e. not transferred) depending on how you transferred it and how the Windows machine is configured. If the resource fork did get transferred, it would show up as a separate file on Windows, with a name that starts with "._"

The right way to transfer files that might have resource forks (or other Mac-specific metadata) is to wrap them up in a container (e.g. a DMG file, or a .zip file created by Finder's "Create Archive" menu item (not the command-line 'zip' since that currently doesn't preserve resource forks!))

edalzell 12-07-2006 02:32 PM

I have discovered we have a Mac with 10.2.5 on it that can read the disks. Just have to get GC installed on it and we should be good to go.

Thanks for all your help.

Carl Stawicki 12-07-2006 02:41 PM

You can fix resouce forks with AppleScript of you know what they are:

Code:

tell application "Finder"
  set file type of file "path:to:file" to "YaddaYadda"
  set creator type of file "path:to:file" to "Whatever"
end tell

But the resource fork is only used to tell the Finder what app to open a file in when the file in double-clicked, which is what file extensions do now. If the file won't open in a app that you know should open it, then I'd guess that there's something wrong with the file. But try to restore the fork with the code above to see what happens because I could be wrong about that.

edalzell 12-07-2006 02:55 PM

Quote:

Originally Posted by Carl Stawicki (Post 340242)
But try to restore the fork with the code above to see what happens because I could be wrong about that.

I tried this:
Code:

tell application "Finder"
        set file type of file "/Users/erin/Desktop/foo" to "DRWG"
        set creator type of file "/Users/erin/Desktop/foo" to "MDRW"
end tell

And got an error: Can't set file type of /Users.... to DRWG

bramley 12-07-2006 03:04 PM

See Carl's post - he's using Mac paths not UNIX paths. i.e the path to a file called "foo" on my desktop needs to be written
Code:

"Name Of My Hard Drive:Users:my user name:desktop:foo"

edalzell 12-07-2006 03:07 PM

I found an app that changes the file types/creator codes. Trying that now.

hayne 12-07-2006 03:08 PM

Quote:

Originally Posted by Carl Stawicki (Post 340242)
But the resource fork is only used to tell the Finder what app to open a file in when the file in double-clicked

1) The type & creator codes are stored as part of the metadata in the HFS+ filesystem - they are not stored in the resource fork of the file.
Look at the following:
Code:

% echo "hello world" > foo.txt

% ls -l foo.txt/..namedfork/rsrc
-rw-r--r--  1 fred  fred  0 Dec  7 14:03 foo.txt/..namedfork/rsrc

% setFileInfo "MDRW" "DRWG" foo.txt

% getFileInfo foo.txt
foo.txt  creator: "MDRW" type: "DRWG"

% ls -l foo.txt/..namedfork/rsrc
-rw-r--r--  1 fred  fred  0 Dec  7 14:03 foo.txt/..namedfork/rsrc

2) Resource forks are used for other things (e.g. custom icons) and especially in files from older apps, can contain important data - not just metadata.

edalzell 12-07-2006 03:22 PM

OK, I have a little more info. Some of the files have file type DRWG and creator code MDPL, which make them MacDraw II files.

The other ones have file type DFDX and creator code SASP. I haven't been able to locate what type these are.

edalzell 12-07-2006 03:30 PM

Quote:

Originally Posted by edalzell (Post 340258)
I found an app that changes the file types/creator codes. Trying that now.

Nope, nothing will open those MacDraw II files. Guess I do need those resource forks.

roncross@cox.net 12-08-2006 01:38 AM

Can you post the files somewhere? I would like to see if I can open it?
 
Can you create a link to it somewhere to see if others can open it?

thx
RLC

edalzell 12-08-2006 02:05 AM

Quote:

Originally Posted by roncross@cox.net (Post 340433)
Can you create a link to it somewhere to see if others can open it?

thx
RLC

Sure, have at 'er.

OSXdude 12-08-2006 02:06 AM

Yes, Please Post A Link!
 
I also enjoy these kinds of challenges. If you can upload the images somewhere, I'd be happy to download them and tinker with them as well, and see if I can find a way to open them for you.

Thanks!

edalzell 12-08-2006 02:09 AM

OSXdude, look up!

OSXdude 12-08-2006 06:04 AM

Quote:

Originally Posted by edalzell (Post 340440)
OSXdude, look up!

Ha! :D

If you look at your post time, and mine, you will see that they are only a minute apart. When I posted my response, yours hadn't appeared on the board yet...at least not on my end. We were probably writing our messages at the same time.

Anyway, I am a bit lost here. When I click on that link, I am taken to a page called "test". Is "test" actually one of the image files? When I download it by holding down my Option key on the link, it downloads as "text.txt".

If it is indeed an image file, I need to know the type and creator of the file, if you know them.

. . . Okay, I just reread your previous messages. I made two copies of the file, added a type and creator to each file, as you specified in your previous message, removed the .txt extension, and then just tried a variety of old graphics programs. So far, I haven't had any success. Neither file has an application icon either...just a standard generic icon.

Carl Stawicki 12-08-2006 09:52 AM

Quote:

Originally Posted by edalzell (Post 340437)
Sure, have at 'er.

Can you .zip the files and upload them that way?

edalzell 12-08-2006 10:41 AM

Quote:

Originally Posted by Carl Stawicki (Post 340502)
Can you .zip the files and upload them that way?

Sure, here they are. I CAN open the first one...it is a MacDraw II document that is viewable in EazyDraw and Intaglio.

hayne 12-08-2006 12:05 PM

The 2nd & 3rd files seem mostly to be text - e.g. open them in TextWrangler and have a look.

edalzell 12-08-2006 12:10 PM

Yes, I know that, but the title would indicate that they are graphics of some kind. It could just be a table of data, but it would be nice to know!

schneb 12-08-2006 03:31 PM

They look like preference files to me. One looks like a settings file for some kind of modem or router.

edalzell 12-11-2006 01:34 PM

Quote:

Originally Posted by schneb (Post 340613)
They look like preference files to me. One looks like a settings file for some kind of modem or router.

Based on their title, the files should be images.


All times are GMT -5. The time now is 01:44 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.