Welcome to TSG!
I'm assuming you are wanting to capture a listing of the folder on the FTP server, not a local folder.
Would be nice if the USAGE: message would include an example or two, and showed what was optional.
It is just as the usage says, and is almost the same as in the command prompt.
In the command prompt, the usage is:
Dir [switches] [path] > file
You're using
Dir /B >dirs.txt
You aren't specifying a
path, so the local folder is assumed.
In FTP it's the same minus the redirection symbol >:
remote directory=
path
local file=
file
But the switches are different. In an FTP shell, it's more or less a Unix shell, and
Dir is an alias for
ls, so google
man ls to get the
Manual page for the
ls command. Note that some options may not be the same with your particular FTP server.
Here's just one:
http://ss64.com/bash/ls.html
So for a bare listing saved to the local file dirs.txt, use this:
Dir [switches] [remote directory] [local file] DIR -C1 dirs.txt
The switch means display in
Columns (3 names per line) and the
1 changes that to one file per line (that is a one, not a lowercase L).
The
C must be capitalized. A lowercase
c sorts by modified(changed) time.
HTH
Jerry