Your best friend for file transfer.

Fetch application logoFetch

Solution: Printing the contents of a direcory in Fetch to a text document (4 posts)

  • Started 2 years ago by Rusty
  • Latest reply 2 years ago from Jim Matthews
  • Rusty Member

    I couldn't find this solution via a quick web search, so I don't know if its documented, but using Mac logic - it works:

    1. Edit > Select all in a Fetch window

    2. File > Copy

    2. Open a text editor - File > Paste

    You can then find and delete the leading string if you wish

    ftp://admin%40example.com:@example.com/files/8613/
    ftp://admin%40example.com:@example.com/files/8614/
    ftp://admin%40example.com:@example.com/files/8615/

    I needed a printout to compare what I had downloaded, as the server choked on a file and I didn't know if I'd downloaded all the folders and files. There were 174 folders and it took hours to download.

    Pasting into BBEdit and then displaying line numbering confirmed all of the folders have downloaded, but is there a way to display the contents like BBEdit does if you drag files from the desktop onto it like this:

    files:
    1013:
    0907:
    6407:
    newsletter.pdf
    1253:
    9836:
    IMG_4646.JPG
    1678:
    0123:
    0588:
    4114:
    7570:
    index.html

    Edited 2 years ago #

  • Jim Matthews Administrator

    The message board software removed the indenting from your example, but I understand what you are getting at. Unfortunately I can't think of an easy way to get that sort of listing from Fetch, but I'll take it as a feature request for a future release.

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 2 years ago #

  • Rusty Member

    I assume there is a terminal command that will list the directory contents so it may be as simple as having a window with a terminal like view that you can select all text and copy.

    Posted 2 years ago #

  • Jim Matthews Administrator

    You could FTP to the server using the "ftp" command in Terminal but I don't think it supports a command to list the contents of a folder, including sub-folders, and their sub-folders, and so on.

    You can use Automator and Fetch's Get Fetch Folder Contents to do this, by checking the "Repeat for each subfolder" option. Then you'd add a Generate Fetch Item Report action to output the path of each item. It'd be a flat list, but you could turn it into an indented list using BBEdit and GREP search/replace. Let me know if you'd like help doing that.

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 2 years ago #

Reply

  • Or nickname, if you prefer.
  • This will be kept confidential.
  • This is to ensure that you’re a person, not a spambot.