Welcome, Guest. Please login or register.

Author Topic: List contents of a drawer in alphabetical order?  (Read 1932 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Robert17Topic starter

  • Hero Member
  • *****
  • Join Date: Apr 2004
  • Posts: 1011
    • Show only replies by Robert17
List contents of a drawer in alphabetical order?
« on: May 25, 2011, 11:48:15 AM »
Hey guys, I'm trying to get a written list of some files in a drawer. They are text documents that need to be converted so I'd like a list so I can check them off as I go.

I have VincEd installed, and can list all the files (246 of them) but I can't figure out how to list them in alphabetical order - at the moment they're a mess of all different files everywhere.

Thanks in advance,

Robert.
« Last Edit: May 25, 2011, 11:48:42 AM by Robert17 »
Member of the Lincs Amiga Group, UK :-)
 

Offline Thomas

Re: List contents of a drawer in alphabetical order?
« Reply #1 on: May 25, 2011, 12:12:23 PM »
on OS 3.9 just enter

list sort n

to sort by name.

In 3.1 and below use something like this:

list >ram:tempfile nohead
sort ram:tempfile ram:tempfile

Offline Franko

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 5707
    • Show only replies by Franko
Re: List contents of a drawer in alphabetical order?
« Reply #2 on: May 25, 2011, 12:17:10 PM »
@ Robert17

Here's quite a flexible way to create alphabetical lists of your dirs/drawers into a plain textfile... :)

Here's what you need to do to create a plain text file in RAM: called FileList with the contents of drawer sorted for you in alphabetical order... :)

List SORT=N PAT=~(#?.info) FILES LFORMAT "%p%n" To RAM:Filelist

NOTE: the "~" is typed by holding down shift and pressing the large key just below ESC on the Amiga keyboard.... :)

The above example will not include files ending with ".info:" if you wish to include these in your list then just remove the "PAT=~(#?.info)" bit... :)

You can muck about with the above line to just list dirs/ drawers alphabetically or any other combination you choose, just type List ? (return) to see all the options... :)

Sorry... forgot to mention... make sure you CD the dir/drawer you want to create a list of... :)
« Last Edit: May 25, 2011, 12:26:09 PM by Franko »
 

Offline Robert17Topic starter

  • Hero Member
  • *****
  • Join Date: Apr 2004
  • Posts: 1011
    • Show only replies by Robert17
Re: List contents of a drawer in alphabetical order?
« Reply #3 on: May 25, 2011, 07:50:56 PM »
Thanks Thomas and Franko, both good answers.

In the end I used list sort n - copied the output text from the shell window, then pasted into editpad :-)
Member of the Lincs Amiga Group, UK :-)
 

Offline number6

Re: List contents of a drawer in alphabetical order?
« Reply #4 on: May 25, 2011, 08:59:20 PM »
Quote from: Robert17;640228
Thanks Thomas and Franko, both good answers.

In the end I used list sort n - copied the output text from the shell window, then pasted into editpad :-)



It might be easier in the future to redirect the identical output to a file instead.
List sort n > [filename]
If OS3.x has the "quick" argument, you can add that to shorten the output further to just the file/dir name.
List sort n quick > [filename]

#6