For those of use who have long forgotton their DOS lingo (and those who came into computers long after it was necessary) could you please de-cypher the Syntax symbols?
dir X:\Music /B /AD /S | sort > AlbumList.txt & start AlbumList.txt
/B - Lists only the filename; omits the header. “Bare” format
/AD - Lists directories.
/S - Lists files in directories and sub-directories.
Everything after /S is new to me though. I never knew you could dump a directory listing to a text file. Could come in handy some day.
jmr is correct about the above switches. You can type DIR /? at the command line if you want more details.
The “|” (called a pipe) is a way to take the output of one command and use it as the input for another command. In this case the output of the DIR command, which would normally go to the screen, is instead used as the input for the SORT command. The SORT command is normally used to sort a text file, but with the pipe we are able to use the output of DIR instead of a physical file.
The “>” is a redirection operator. It takes the output of the command to the left of the operator and sends it to the file on the right of the operator. Normally, the SORT command would send its output to the screen. Using redirection we are able to send it to the AlbumList.txt file instead.
The “&” is a command separator. It lets you execute multiple commands on the same line. In this case the DIR|SORT>AlbumList.txt command is executed first, then the START command is executed.
The START command is basically a command line way of double clicking on a file. “START AlbumList.txt” is the same as double clicking on AlbumList.txt. There’s a lot more to the START command, but launching files with the associated application is the main use.
Message Edited by Skinjob on 09-24-2008 10:00 AM