Is there a way to make a folder appear as a file (package)?

Posted:
in macOS edited January 2014
I've downloaded a theme (.thm) file that I'd like to upload to my phone. However, when it was decompressed by 10.4, the file appeared as a folder with an extension. Inside of the folder are some gifs and an xml file. How can I make this appear as a file instead of a folder?

Comments

  • Reply 1 of 20
    lundylundy Posts: 4,466member
    Quote:

    Originally posted by Keda

    I've downloaded a theme (.thm) file that I'd like to upload to my phone. However, when it was decompressed by 10.4, the file appeared as a folder with an extension. Inside of the folder are some gifs and an xml file. How can I make this appear as a file instead of a folder?



    Add ".app" to the end of the folder name. Presto.
  • Reply 2 of 20
    keshkesh Posts: 621member
    Quote:

    Originally posted by Keda

    I've downloaded a theme (.thm) file that I'd like to upload to my phone. However, when it was decompressed by 10.4, the file appeared as a folder with an extension. Inside of the folder are some gifs and an xml file. How can I make this appear as a file instead of a folder?



    Silly thought but... maybe it's supposed to look like that. Have you tried installing it to your phone as-is?
  • Reply 3 of 20
    kedakeda Posts: 722member
    Thanks. But...



    The .app thing did indeed work. However, I am stuck w/the .app extension and I need to upload the .thm. Once the file is on the phone, I have no way to rename it, using Bluetooth File Exchnage.



    The themes that came w/my phone are all .thm files and look like single files (packages?). Is this one of those things that Super Get Info (edit type and creator) might be able to help with?



    Thanks again.
  • Reply 4 of 20
    keshkesh Posts: 621member
    Got it! A quick Google search turned up a forum post elsewhere, which seems to indicate that the .thm file is really a tarball.



    So, what you want to do is type the following into Terminal:



    Code:


    tar -cf filename.thm







    ... and drag the folder with all those files into the Terminal window. NOTE: you need a space after the .thm so it knows that filename is seperate from where the folder is. And "filename" should be the name of the theme.



    You should then be able to install the resulting .thm file onto your phone.



    Hope that works!
  • Reply 5 of 20
    kedakeda Posts: 722member
    Wow, thanks Kesh. Ok, I tried that, but I think I did something wrong. Here's what I did and what Terminal said:



    tar -cf Coldhearted.thm /Users/sean/Desktop/Coldhearted.thm/

    tar: Removing leading `/' from member names



    I am completely incompetent in the terminal, so please forgive my ignorance.
  • Reply 6 of 20
    kedakeda Posts: 722member
    I just remembered that this file was originally DL'd as a tar file. I originally opened the file in the finder. If I re-download the .tar file, can I open it in Terminal? Maybe this would de-compress the file correctly.



    BTW, Kesh, I just noticed that you live in Waipahu. I went to school at St. Joseph's when I lived in HI. I still have some friends there.
  • Reply 7 of 20
    geekdreamsgeekdreams Posts: 280member
    Just download the .tar file and rename it to filename.thm (change the extension from .tar to .thm). That should work.
  • Reply 8 of 20
    kedakeda Posts: 722member
    I swapped the extension to '.thm' from '.tar.' This appeared to do the right thing, but the phone does not recognize the theme.



    It seems that .thm is a sony Ericsson Theme file. So, I think I need to decompress the .tar, then get the directory to show up as a single file, w/the .thm extension. Hmmmm.
  • Reply 9 of 20
    keshkesh Posts: 621member
    Quote:

    Originally posted by Keda

    I swapped the extension to '.thm' from '.tar.' This appeared to do the right thing, but the phone does not recognize the theme.



    It seems that .thm is a sony Ericsson Theme file. So, I think I need to decompress the .tar, then get the directory to show up as a single file, w/the .thm extension. Hmmmm.




    Okay, wait, wait.



    When you download the file, before it gets decompressed, does it end in ".thm" or ".tar"? If it's the former, then just don't decompress it. If it's the latter, it's a bit more tricky.
  • Reply 10 of 20
    kedakeda Posts: 722member
    When I DL'd the file, it ends in .tar. After decompression, it ends in .thm.
  • Reply 11 of 20
    keshkesh Posts: 621member
    Quote:

    Originally posted by Keda

    When I DL'd the file, it ends in .tar. After decompression, it ends in .thm.



    Hm, okay. So you decompress the .tar, and it turns into a folder that ends in .thm full of files? Ick.



    Alright, I'll have to read up on this some more. It might help if you posted what kind of phone you're using, so I can research how this is supposed to work.
  • Reply 12 of 20
    kedakeda Posts: 722member
    Thanks for the help.



    Yep, thats what happens...it decompresses and then looks like a folder.



    I have an Ericsson T637.
  • Reply 13 of 20
    elronelron Posts: 126member
    Quote:

    Originally posted by Keda

    Thanks for the help.



    Yep, thats what happens...it decompresses and then looks like a folder.



    I have an Ericsson T637.




    Does the download link say ".thm" or ".tar"?



    Safari tends to change file extensions to the reported MIME type, so if my blah.c file has the MIME type text/plain, Safari will download it as blah.c.txt (or maybe just blah.txt... I don't remember which). I wouldn't be surprised if the server you're downloading the file from is reporting that the MIME type is "application/x-tar", which makes Safari think the file should end in .tar.



    So here's my suggestion: Download the file again but this time, don't decompress it. Instead, just change the filename from *.tar to *.thm.





    HTH.
  • Reply 14 of 20
    keshkesh Posts: 621member
    Good point. In fact, what I suggest is visiting the original site again and, this time, right-click (or ctrl-click) the link and choose "Save to Downloads folder". (It may say Desktop instead, or wherever your default download location is.)



    See if you get a .thm file that way, and let us know.
  • Reply 15 of 20
    kedakeda Posts: 722member
    Ok, I tried to DL the file via a rt-click, but it still ended up w/a .tar. Changing the folder extension to .thm does make it look like a file (generic white file icon) but the phone does not recognize this as a theme.



    Also, I poked around on the cmd line w/ tar and found a command that shows the content of a .tar archive. To no surprise, the contents are listed as the folder contents of the decompressed tar.



    Unfortunately, the site that I'm getting this theme from does not have a direct link to the file, so I cannot see what is actually happening--I mean that when I mouse over the link, the status bad doesn't mention a file, but some kind of Db query.
  • Reply 16 of 20
    keshkesh Posts: 621member
    Argh. Okay, I hate sites like that. :P



    Anyway, I've found the solution. As I suspected, the .thm file is just a tarball of the theme files themselves, and not the entire folder they're in.



    In other words, what you need to do is two commands. First, in Terminal, type "cd " (including the space after it), then drag your theme folder to the Terminal window and press Return. That should change you into the folder itself, as an 'ls' command would show the theme files. Then, you type:



    Code:


    tar -cvf ../theme.thm *







    This will tarball all the theme files into a .thm file (name it appropriately for the theme!), and drop the new theme file into the theme folder's parent directory. So, if you have the folder on your Desktop, the theme file will appear in your User folder.



    For more info (and a link the the MacOS X version of Sony's Theme Creator), check out this site.



    Hope that helps!
  • Reply 17 of 20
    zozo Posts: 3,117member
    what about

    a) temporarily switching off "Open 'safe' files after downloading" in Safari

    b) use a different browser (Firefox)
  • Reply 18 of 20
    keshkesh Posts: 621member
    Quote:

    Originally posted by ZO

    what about

    a) temporarily switching off "Open 'safe' files after downloading" in Safari

    b) use a different browser (Firefox)




    Er, he already mentioned that it's a .tar file that gets downloaded. Unless Safari is doing something funky to the file before he sees it, that's not going help. Whenever he tries to untar the file, it's going to get the same exact results as if Safari did it automatically.
  • Reply 19 of 20
    kedakeda Posts: 722member
    Kesh...Thanks!



    That worked perfectly. How did you find that?



    Also, thanks for the link. I think I'm going to make my own theme now that I can upload it.



    Thanks again!
  • Reply 20 of 20
    keshkesh Posts: 621member
    Quote:

    Originally posted by Keda

    Kesh...Thanks!



    That worked perfectly. How did you find that?




    You're welcome! And you'll find that Google is your friend. I did a few different searches, until I finally found that link. Glad it worked out.
Sign In or Register to comment.