Listing Contents of Folders and Sub Folders

What I'd like to do is generate some kind of pdf or text file that lists the complete contents of a folder or some folder. For instance, when using iTunes, you can print a list of all albums and song names inside your iTunes.
In this case, however, I want to make a list of all the items in my various external hard drives. I have a lot of organizing files to do, so I'd like to just get it all listed, and start thinking about how I might organize things.
I also want this list as a record of the current status of my files -- so that after I change things around, I'll be able to refer back to how I previously had files organized.
Hope this makes sense. Thanks for the help.

Textwrangler worked quite well. My only complaint is that it gave me the files in a kind of strange order, so it's not that easy to use as a reference list.
As for the terminal option, so many of my folders have spaces in their names that I just wouldn't be able to get a clean result.
Thanks.

Similar Messages

  • Urgent ! How to Zip Folder Contents including files and sub folders.

    Hi, i need an urgent help from you regarding zipping the contents of any folder/directory including its sub folders and files to a .zip file. Please provide a code for ot or help me out. It is really very urgent.
    Thanx Waiting....

    This class can add a string or file to a ZIP. Maybe you can adapt it to do a directory and all its subfolders and files recursively:
    package demo;
    import java.io.BufferedReader;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.File;
    import java.io.FileReader;
    import java.io.IOException;
    import java.util.zip.GZIPInputStream;
    import java.util.zip.GZIPOutputStream;
    import java.util.zip.ZipException;
    * Demo for using the Zip facilities to compress data
    public class ZipDemo
        /** Default buffer size */
        private static final int DEFAULT_BUFFER_SIZE = 4096;
         * Compress a string
         * @param uncompressed string
         * @return byte array containing compressed data
         * @throws IOException if the deflation fails
        public static final byte [] compress(final String uncompressed) throws IOException
            ByteArrayOutputStream baos  = new ByteArrayOutputStream();
            GZIPOutputStream zos        = new GZIPOutputStream(baos);
            byte [] uncompressedBytes   = uncompressed.getBytes();
            zos.write(uncompressedBytes, 0, uncompressedBytes.length);
            zos.close();
            return baos.toByteArray();
         * Uncompress a previously compressed string;
         * this method is the inverse of the compress method.
         * @param byte array containing compressed data
         * @return uncompressed string
         * @throws IOException if the inflation fails
        public static final String uncompress(final byte [] compressed) throws IOException
            String uncompressed = "";
            try
                ByteArrayInputStream bais   = new ByteArrayInputStream(compressed);
                GZIPInputStream zis         = new GZIPInputStream(bais);
                ByteArrayOutputStream baos  = new ByteArrayOutputStream();
                int numBytesRead            = 0;
                byte [] tempBytes           = new byte[DEFAULT_BUFFER_SIZE];
                while ((numBytesRead = zis.read(tempBytes, 0, tempBytes.length)) != -1)
                    baos.write(tempBytes, 0, numBytesRead);
                uncompressed = new String(baos.toByteArray());
            catch (ZipException e)
                e.printStackTrace(System.err);
            return uncompressed;
         * Uncompress a previously compressed string;
         * this method is the inverse of the compress method.
         * Implemented in terms of the byte array version.
         * @param string containing compressed data
         * @return uncompressed string
         * @throws IOException if the inflation fails
        public static final String uncompress(final String compressed) throws IOException
            return ZipDemo.uncompress(compressed.getBytes());
         * Main driver class for ZipDemo
         * @param command line arguments - either string or file name to compress
        public static void main(String [] args)
            try
                for (int i = 0; i < args.length; ++i)
                    String uncompressed = "";
                    File f              = new File(args);
    if (f.exists())
    BufferedReader br = new BufferedReader(new FileReader(f));
    String line = "";
    StringBuffer buffer = new StringBuffer();
    while ((line = br.readLine()) != null)
    buffer.append(line);
    br.close();
    uncompressed = buffer.toString();
    else
    uncompressed = args[i];
    System.out.println("length before compression: " + uncompressed.length());
    byte [] compressed = ZipDemo.compress(uncompressed);
    System.out.println("length after compression : " + compressed.length);
    String compressedAsString = new String(compressed);
    System.out.println("length of compressed str : " + compressedAsString.length());
    byte [] bytesFromCompressedAsString = compressedAsString.getBytes();
    boolean isTheSameAs = bytesFromCompressedAsString.equals(compressed);
    System.out.println("compressed bytes are " + (isTheSameAs ? "" : "not ") + "the same as from String");
    System.out.println("length of bytesFrom...: " + bytesFromCompressedAsString.length);
    String restored = ZipDemo.uncompress(compressed);
    System.out.println("length after decompress : " + restored.length());
    isTheSameAs = restored.equals(uncompressed);
    System.out.println("original is " + (isTheSameAs ? "" : "not ") + "the same as the restored");
    String restoredFromString = ZipDemo.uncompress(compressedAsString);
    isTheSameAs = restoredFromString.equals(uncompressed);
    System.out.println("original is " + (isTheSameAs ? "" : "not ") + "the same as the restored from string");
    catch (Exception e)
    e.printStackTrace(System.err);
    MOD

  • Coping folder contents and sub folders

    So, I'm working on a little practice folder sync project (fun with my mac)...
    ...and I'v gotten hung up a bit because my little copying app doesn't seem to count folders and sub folders (which I suppose makes sense).
    My initial idea was to take just the date of modification and compare it to the last date that the app was run, inorder to only copy changed files. But this seems problematic on a few levels, so...
    So, my two part question is:
    1. Is there a simple command to copy folder contents and sub-folder contents, or do I need to tell the script to do each sub-folder individually?
    2. I imagine that a better way to manage which files/folders need to be updated is to create a file with a list of the contents, and dates of modification, and compare the new folder list and the old folder list to each-other... ok.. so, um. yeah. that sounds tricky.

    >1. Is there a simple command to copy folder contents and sub-folder contents, or do I need to tell the script to do each sub-folder individually?
    There are two common solutions to this.
    The first is to use the Finder's 'entire contents of...' command to get a list of everything in the folder, including sub-folders, the second is to make your script recursive - that is, it calls itself several times over.
    In the first case it's as simple as:
    tell application "Finder"
    set allItems to entire contents of folder "path:to:source:folder:"
    -- rest of code goes here
    end tell
    This can have problems, though, especially on very large directories since the Finder is not very efficient at building a list of hundreds or thousands of files.
    The recursive path is a little trickier, but you write a handler to process a folder then repeatedly call that handler, like:
    <pre class=command>on run
    set sourceFolder to (choose folder)
    processAFolder(sourceFolder)
    end run
    on processAFolder(theFolder)
    tell application "Finder"
    set allItems to items of folder theFolder as alias list
    repeat with eachItem in allItems
    if class of eachItem is folder then -- we have a subfolder
    processAFolder (eachItem)
    else
    -- code here to compare the file and back it up
    end if
    end repeat
    end tell
    end processAFolder</pre>
    So here you walk through the folder, each time you find a new folder, you walk through that until you're done. The code takes care of keeping track of where you are in the folder hierarchy.
    >2. I imagine that a better way to manage which files/folders need to be updated is to create a file with a list of the contents, and dates of modification, and compare the new folder list and the old folder list to each-other... ok.. so, um. yeah. that sounds tricky.
    There's no need to keep a file. Assuming you have two folders you can just walk through one of them checking to see if each item exists in the other, then copy the newer file to the other directory, like:
    <pre class=command>on processAFile(fileName, sourceDir, destDir)
    tell application "Finder"
    -- check if the files exist
    set sourceFileExists to (file fileName of folder sourceDir exists)
    set destFileExists to (file fileName of folder destDir exists)
    -- now comes the logic
    if sourceFileExists and not destFileExsits then
    duplicate file fileName of folder sourceDir to folder destDir
    else if destFileExists and not sourceFileExists then
    -- assuming you want a two-way synch
    duplicate file fileName of folder destDir to folder sourceDir
    else -- both files exist, so check mod dates
    if (modification date of file fileName of folder sourceDir) > (modification date of file fileName of folder destDir) then
    duplicate file fileName of folder sourceDir to folder destDir
    else if (modification date of file fileName of folder destDir) > (modification date of file fileName of folder sourceDir) then
    duplicate file fileName of folder sourceDir to folder destDir
    end if
    end if
    end tell
    end processAFile</pre>
    If you're not planning a two-way synch an even simpler option is to just keep track of the last time the synch was run. Then all you need to do on subsequent runs is ask the Finder for 'every file of folder sourceFolder whose modification date is greater than lastRunDate'.

  • Can I arrange my bookmarks so that the folders and sub-folders are at the top of the list like in Explorer?

    I transferred all of my "Favorites" from Explorer. I have a lot of folders and sub-folders and I would like these to be listed at the top (as in Explorer) with individual bookmarks below. Right now the folders and individual bookmarks are mixed together.

    http://kb.mozillazine.org/Sorting_and_rearranging_bookmarks_-_Firefox
    If you '''Sort by Name''' in the Bookmarks Sidebar, that is how Firefox sorts bookmarks. If you have any '''''Separators''''', the Sort will stop there and you'll have to Sort from there down separately.

  • Deleting Files and (sub)folders - how to

    Hi,
    Easy question. Easy there a vbscript to delete all files and (sub)folders, empty or not. Important, here is that the parent folder must NOT be deleted, only it´s contents. (important: this folder is located on a mapped share \\servername\foldername\)
    please help

    Hi,
    ' Delete All Subfolders and Files in a Folder
    Const DeleteReadOnly = TRUE
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    objFSO.DeleteFile("C:\FSO\*"), DeleteReadOnly
    objFSO.DeleteFolder("C:\FSO\*"),DeleteReadOnly
    Save the above code in test file with .vbs file extension. modify "C:\FSO" to your folder.
    Disclaimer: This posting is provided AS-IS with no warranties or guarantees and confers no rights. Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually
    answer your question. This can be beneficial to other community members reading the thread.

  • I am struggling! Help! I need to move 3500 pics-in TIFF format in 175 folders and sub folders from my old PSE6, Windows XP to my new PSE13, Windows8.1. I have the PSE6 backed up on an external hard drive. What is the safe way to do this? Can anyone at Ado

    I am struggling! Help! I need to move 3500 pics-in TIFF format in 175 folders and sub folders from my old PSE6, Windows XP to my new PSE13, Windows8.1. I have the PSE6 backed up on an external hard drive. What is the safe way to do this? Can anyone at Adobe help me? Please?

    Use the Organizer backup & restore method, starting the restore from the TLY file. Probably best to use a custom location as the XP file structure will be different. See this link for further help:
    http://helpx.adobe.com/photoshop-elements/kb/backup-restore-move-catalog-photoshop.html

  • Jsp code (js code) to display(tree) the files and sub folders in a folder

    Hi all
    plz can any one send me the source in jsp or js to display in tree structure for files and sub folders in a folder.

    There are dozens of Javascript tree widgets available on the Internet. Some are free. Some are good. Google will find them for you.
    (The only relevance of JSP to your question is that yes, you can generate HTML that uses one of those Javascript tree widgets.)

  • Importing existing folders and sub folders of photos into photoshop organiser 9

    I have over 10,000 photos nicely organised in folders and sub folders in Bridge CS3 and want to migrate over to photoshop elements and use their organiser so I have everything in one place. However, when I try to import the photos, it brings them in as individual photos and not in their folders. It seems like I need to recreate a load of albums and then drag and drop the photos into them. I don't have time to recreate hundreds of album names to replicate my system as it is. Is there any way round this or should I be looking at a different system altogether?
    Thank you for any advice on this.

    ... should I be looking at a different system altogether?
    If your entire organizational goals are to continue to use your "nicely organised" folders, then why bother with the PSE Organizer in the first place? You have extra work (must import the photos) and more limitations (must do all photo management inside of the PSE Organizer), and its hard to see any benefit from using the PSE Organizer. You won't achieve any "better organization" than what you have now.
    If your goals are to use PSE tools to organize (tags, captions notes), in addition to (or as a replacement for) your folder organization, then the PSE Organizer can be very useful.

  • Query to get a listing of all folders and joins in EUL

    If anybody has a query that provides a listing of all folders and joins between those folders in a Discoverer EUL, can you please share it.
    Any help would be greatly appreciated.

    Hi
    As Rod commented you won't get an accurate listing going through XREFS. You need to look in the statistics table, EUL5_QPP_STATS where you will find a history of all worksheets that have been executed. Unfortunately the item columns in EUL5_QPP_STATS are encoded so you will need some special SQL to uncode them.
    First of all you will need to have installed the EUL extensions which can be found in the script called EUL5.SQL (located in the Discoverer\Util folder where Admin is installed) when logged in as the owner of the EUL. Theh try running this script, altering the data switch to a suitable date:
    SELECT
    QS.QS_DOC_OWNER    USER_NAME,
    QS.QS_DOC_NAME     WORKBOOK,
    QS.QS_DOC_DETAILS  WORKSHEET,
    TRUNC(QS.QS_CREATED_DATE) EXECUTION_DATE,
    *(LENGTH(TO_CHAR(EUL5_GET_ITEM_NAME(QS.QS_ID)))+1)/9 ITEMS,*
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),1,  6)) ITEM1,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),10, 6)) ITEM2,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),19, 6)) ITEM3,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),28, 6)) ITEM4,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),37, 6)) ITEM5,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),46, 6)) ITEM6,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),55, 6)) ITEM7,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),64, 6)) ITEM8,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),73, 6)) ITEM9,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),82, 6)) ITEM10,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),91, 6)) ITEM11,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),100,6)) ITEM12,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),109,6)) ITEM13,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),118,6)) ITEM14,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),127,6)) ITEM15,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),136,6)) ITEM16,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),145,6)) ITEM17,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),154,6)) ITEM18,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),163,6)) ITEM19,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),172,6)) ITEM20
    FROM
    EUL5_QPP_STATS QS
    WHERE
    *(LENGTH(TO_CHAR(EUL5_GET_ITEM_NAME(QS.QS_ID)))+1)/9 < 21*
    AND QS.QS_CREATED_DATE > '01-JAN-2009'
    Best wishes
    Michael

  • How to find out how many items within folder (and sub folders)?

    Hi all,
    This may be a silly question - but if I have a folder (containing sub folders etc) is there a way to calculate how many file items are within this folder?
    I cant seem to do it using the info panel. And the standard view tells you how many file items are within the folder you are looking at, but not in the sub and sub sub folders etc.
    Thanks for any help!
    Paul

    or maybe
    SuperGetInfo
    http://www.barebones.com/products/super/index.shtml

  • How To Add Folders and Sub Folders

    I am brand new (1 week) to my new Mac (iMac). In my Windows-based PC I used to have, for example, a folder named PHOTOS followed by sub folders designating certain categories that work for me, such as, "Family", "Vacations" etc, and I would make sure that all my uploads from my camers went to the appropriate folder.
    I would like to accomplish the same thing in my Mac, but have no idea how to go about it. I do not even know how to create such folders and sub folders.
    Is someone out there who can help, please?

    pstoll
    In the Finder: File -> New Folder creates a new Folder. To nest a folder inside another one then simply drag the second one to the first.
    But if you're trying to organise your photos, there's a much better way to do that on your Mac. Check out iPhoto It's a photo manager that's integrated throughout the Operating System. It's much, much more flexible than a bunch of folders in the Finder. You can keyword your pics, populate Smart Albums automatically, rate and edit your pics, all via iPhoto.
    You can find out more here:
    http://www.apple.com/ilife/iphoto/
    there are some tutorials here
    http://www.apple.com/ilife/tutorials/#iphoto
    and a good forum here:
    http://discussions.apple.com/category.jspa?categoryID=143
    My best advice is to explore the app by dragging in maybe 100 pics and testing things out, gettting the hang of it. It's miles better than a folder hierarchy.
    Regards
    TD

  • Working with Folders and Sub-Folders

    I'm updating this big site, and its pages are organized into
    folders. I've only ever organized my images and .pdf files with
    folders not my html files but all my prior sites have never had so
    many files as this one. It’s starting to drive me crazy
    though because pages in folders aren't connecting to scripts in the
    scripts folder, menus aren't working right because of it and I'm
    not sure what I can do to fix it.
    My question is if images are showing up in these sub-pages,
    the linked css is being applied in these sub-pages why are the
    scripts not working in the sub-pages? For example, all the top
    level pages easily connect to the rotating JavaScript banner, but
    as soon as you go into a sub-folder page the banner disappears. All
    these files are being updated via templates so any changes I'm
    doing is affecting all the pages the same. That’s why
    it’s confusing me why an image would connect the same but a
    script wouldn't. Don't they search for their links root down or
    does it search the folder its in down? How can you get templates to
    work under such conditions where files are both in the root and in
    folders and sub-folders?
    Site reference is:
    http://golfforkids.net/focus/index.html
    Please note that this is a temporary domain for testing. The
    top menu will pop up a window saying that it needs to be
    registered. They are, just not to that domain and I don't have
    access to the native domain. Sorry for the inconvenience!
    Thank you for any clarification!!!

    ''"Are you subscribed to those subfolders?
    File (Alt-F) - Subscribe"''
    Please see #2 in original post:
    ''"2) Trying to Subscribe to folders only shows Inbox, not sub-folders for Inbox."''
    Attached is an image illustrating this (this screenshot was taken after forcing Thunderbird to show Inbox folders as described in #3 of OP)
    {In OP I was unable to attach images}

  • Unlocking All Folders and Sub Folders When Sharing

    Is there a way to share files and unlock them automatically. I Have many hundreads of excel and word docs in folders and sub folders.
    After a day scratching my head trying to work out why I could not save them on the shared computer I realized that I needed to unlock the folder.
    Excel does not have in its preferences anything that suggest this....it gets old real quick opening each file and then typing my computer password for each folder/ file etc....truly hope this can be done.
    Thanks in advance!

    Anyone???

  • HT201250 When restoring Time Machine after a failure, does it also restore the files to the same order, for example - within iPhoto I have pics/ videos in folders and sub folders organised as family/events etc - will it go back to this exact order after a

    When restoring Time Machine after a failure, does it also restore the files to the same order, for example - within iPhoto I have pics/ videos in folders and sub folders organised as family/events etc - will it go back to this exact order after a restore?

    Hi Stavros0203,
    When restoring your entire system from a Time Machine backup, it is restored to the state it was when that backup was made. See this article for reference -
    OS X Yosemite: Recover your entire system
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • Why do the title bar on Firefox and taskbar on Windows 7 leave distorted image when a list of bookmark folders crosses either one ?

    I use lots of folders in my bookmarks list. I have noticed that with both AMD and Nvidia based video cards, that if I am using a folder in my bookmarks list that has lots and lots of bookmarks, the list of bookmarks will cross both the title bar area of Firefox and the taskbar on Windows 7 at the bottom. When this happens, both the title bar on Firefox versions 8-10 and the taskbar at the bottom will leave images from the bookmark list that don't go away (unless I use F11 view fullscreen to clear away the image and restore to normal ). If I am using a Matrox video card, this doesn't happen. Why is this?

    Hey cor-el,
    Wow. That did it. You are a genius! Thank you, thank you. It's very important that I be able to use the folders with saved bookmarks feature for my business which I rely on daily.
    I unchecked the "use hardware acceleration feature" where you said it was in Firefox 9 browser and it resolved the problem immediately. I am using an Nvidia GS8400 video card. I was having the same problem on the new ATI/AMD video cards too (haven't tested though on ATI computer yet). My Matrox M9120 doesn't do that at all though. Do you have any idea why that is ? Is it a software conflict between Nvidia or AMD drivers and Firefox?
    One more question on your response solution, why do you recommend upgrading to current video card drivers since un-checking the "hardware acceleration" feature in Firefox works? The video card drivers on the disc that came with the card I am using were supplied by the manufacturer and released last year. Shouldn't that be good enough?

Maybe you are looking for