F.NAME is changing the file type?

  1. 6 days ago

    michael m

    is not verified Nov 5 Pre-Release Testers, Xojo Pro

    I'm a little baffled by this. Finishing up some updates for a work project and I had to introduce F.NAME to rename images after they are processed through the application. Ok, so it changes the name just fine.
    But I noticed that afterwards, the file type changes from TIFF => "TextEdit.app Document".
    Any idea what is causing this to happen?

    I know it's doing something weird because photoshop won't even recognize the file after the renaming has happened.

    you are dropping the extension

  2. Jeff T

    Nov 5 Pre-Release Testers Midlands of England, Europe

    What is the file name, INCLUDING EXTENSION that you change the name to be?

  3. Dave S

    Nov 5 San Diego, California USA

    unlike in days past, a filename no longer officially defines the type of data in a file (or at least it shouldn't).... It might give a clue to the end-user... but the applications should verify the contents itself before attempting to read or write it. That being said... what do you mean by "it is changing the file type"

  4. Emile S

    Nov 5 Europe (France, Strasbourg)

    @Dave S It might give a clue to the end-user

    Only if they ask the OS to display the file extensions…

    Michael: what is the answer to Jeff question ?

  5. Dave S

    Nov 5 San Diego, California USA

    Emile.. the point is the filename (with or without an extension) does not define the contents of the file

  6. michael m

    is not verified Nov 5 Pre-Release Testers, Xojo Pro

    Sorry I've been away from my desk for the day.
    So I am dragging (mainly) Tiffs onto the window. It then displays certain metadata that we use internally. And then goes and changes the name of the original files based on our naming conventions.
    Basically, image1.tiff => prefix_19_image1.tiff.
    But after it renames the images, the file type goes from Tiff => TextEdit.app Document

  7. michael m

    is not verified Nov 5 Pre-Release Testers, Xojo Pro

    Before:
    link text

    After:
    link text

  8. Dave S

    Nov 5 San Diego, California USA

    Do you mean the FILE ASSOCIATION? this is the app the by default opens the file....

    but just changing a filename should not disrupt any of that

  9. Dave S

    Nov 5 Answer San Diego, California USA

    you are dropping the extension

  10. Jürg O

    Nov 5 Pre-Release Testers, Xojo Pro
    Edited 6 days ago

    @michael m Before - After

    Before: image1.tif
    After: VNDR_19_image1 (and no file extension)

    That's what you get - the expected result.
    Just name the output file: VNDR_19_image1.tif - and you get the result you intend to get.

    F.NAME is changing the file type?

    There is no longer such a thing. It's the file extension (.png, .tif, .tiff, .jpg, .jpeg, ...) that makes the (biggest) difference. Without any, macOS (as well as other Operating Systems) just doesn't know what to do. So it's default suggests to (try to) open that with TextEdit.app

  11. michael m

    is not verified Nov 5 Pre-Release Testers, Xojo Pro

    @Jürg O Before: image1.tif
    After: VNDR_19_image1 (and no file extension)

    That's what you get - the expected result.
    Just name the output file: VNDR_19_image1.tif - and you get the result you intend to get.

    There is no longer such a thing. It's the file extension (.png, .tif, .tiff, .jpg, .jpeg, ...) that makes the (biggest) difference. Without any, macOS (as well as other Operating Systems) just doesn't know what to do. So it's default suggests to (try to) open that with TextEdit.app

    Thank you Jürg! I didn't even realize that the file extension was left out!! It's always the little things that I overlook!

  12. michael m

    is not verified Nov 5 Pre-Release Testers, Xojo Pro

    @Dave S you are dropping the extension

    And thank you Dave. You were first.
    Sorry Jürg - I had to take back my "mark question answered" and give it to Dave.

  13. Jeff T

    Nov 6 Pre-Release Testers Midlands of England, Europe

    Hmm. :)

  14. Julian S

    Nov 6 Pre-Release Testers, Xojo Pro UK

    -image-

    Just for Jeff :)

or Sign Up to reply!