Results 1 to 7 of 7

Thread: How to Export file and folder names to text file in MAC?

  1. #1
    Join Date
    Dec 2009
    Posts
    34

    How to Export file and folder names to text file in MAC?

    Hello everyone, I am using Mac OS X 10.5 on my Macbook Pro and I am facing a small problem in which I need your help. I want to export the names of all the files and subfolder which are inside a specific folder in to a text file and then print the list but I dont know how to go about it. Is there any application available which can help me in achieving the desired result? So if anyone knows How to Export file and folder names to text file in MAC then please share some information. Any help is highly appreciated. Thanks in advance.

  2. #2
    Join Date
    Apr 2009
    Posts
    994

    Re: How to Export file and folder names to text file in MAC?

    I dont think there is any application available for achieving the result which you want. You will have to manually populate the text file with the names of the files and sub folders contained in the folder. You will have to copy the name of the file in the folder and then paste in the text file. It is a very lengthy process but it is the only way out.

  3. #3
    Join Date
    Apr 2009
    Posts
    970

    Re: How to Export file and folder names to text file in MAC?

    You do not require any extra application for copying the name of the files and folders of a particular folder. To get the desired result, In the finder, open applications. Inside applications, select utilities and open up Terminal. In the terminal type the following command "ls -R > filename.txt" and hit enter. This command will copy the names of all the files and folder which are present in the current folder to the text file named filename. Hope the post helps.

  4. #4
    Join Date
    Dec 2009
    Posts
    34

    Re: How to Export file and folder names to text file in MAC?

    Thanks for replying to the post. I entered the command which you have suggested and it copied the names of all the files and subfolders inside the main folder to a text file but it did not copy the names of the hidden files and sub folders. I think the command for copying the hidden file names would be different. Can you suggest me the command for copying the names of the hidden items?

  5. #5
    Join Date
    Apr 2009
    Posts
    970

    Re: How to Export file and folder names to text file in MAC?

    The command which I have provided in the earlier post will not list all the files which are hidden in the folder. Hence to see all the hidden files and to add the files to the list, use the following command "ls -a -R" and hit enter. Now all the files including the hidden files will be listed in the text file.

  6. #6
    Join Date
    Apr 2009
    Posts
    1,107

    Re: How to Export file and folder names to text file in MAC?

    If you dont want to use the terminal for copying all the contents from the folder, you can use the application known as Textwrangler. Textwrangler helps the user in directly copying the name of the files and sub-folders of the folder to the file of desired format which can be printed using Apple Script. Download and install the application and see if it helps.

  7. #7
    Join Date
    Dec 2009
    Posts
    34

    Re: How to Export file and folder names to text file in MAC?

    Thanks for suggesting the application for importing all the names of the files and folders. Yes textwrangler is indeed very easy to use when compared to using the terminal for importing the names of the files and folders. After importing the files names to the text file I was able to print the text file using the AppleScript.

Similar Threads

  1. Windows Batch file to output directory names and size to txt file
    By m2thearkus in forum Software Development
    Replies: 6
    Last Post: 16-07-2010, 12:04 AM
  2. Export odb to csv text file
    By Ricky58 in forum Software Development
    Replies: 2
    Last Post: 25-08-2009, 05:43 PM
  3. Copy multiple file / folder names to clipboard
    By devpat in forum Windows Software
    Replies: 3
    Last Post: 04-08-2009, 02:51 PM
  4. Issue with Explorer not showing file & folder names
    By Jabeen in forum Customize Desktop
    Replies: 3
    Last Post: 28-07-2009, 12:03 PM
  5. Export file names to excel
    By PRIYAPEARL in forum Windows Software
    Replies: 2
    Last Post: 12-06-2009, 08:07 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,581,580.48780 seconds with 17 queries