file attributes to txt file script

Discussion in 'Mac Programming' started by diegoborgh, Dec 22, 2009.

  1. diegoborgh macrumors newbie

    Apr 14, 2007

    I need desperately a script that can take some file attributes from a folder and write them down in a txt file.
    Basically I need the name.extension, byte size and timestamp, tab delimited.
    How can I do this?

  2. MacForMeOneDay macrumors member

    Jun 16, 2007
    In Terminal, you can run:
    ls -l folderofinterest > txtfile
    Where folderofinterest is the folder but will list all the files within it. If you just want the directory itself, use "-d". txtfile is the name of the file you want to send the information to. You can run it on a commandline/terminal without the "> txtfile" part to see if meets your needs.

    Do a man on ls for more information.

Share This Page