Re: Ways to get a Directory Listing in a Text File, or Printed out - Re: Web site directories



On Mon, 21 May 2007 20:30:07 GMT, pmj commented


"Ali" <ali.on_usenet@xxxxxxxxxxxx> wrote in message
news:Xns9937D618A86D4314159265358@xxxxxxxxxxxxxxxxx
On Mon, 21 May 2007 18:58:37 GMT, pmj commented
"Ali" <ali.on_usenet@xxxxxxxxxxxx> wrote in message
news:Xns9937C1BE28B63314159265358@xxxxxxxxxxxxxxxxx

How do you specify which folder to print the contents of?

Various ways...

Use the CD (Change Directory) Command, in a Command Prompt Window
(or in a Script or Batch File, called up from a windoze Explorer
Window)

That doesn't specify a folder, just changes to the specified folder,

Well, if yo ucall up a Script (or Batch File) by using the
*RightClick* Action, then the Folder Name that yo uRightClick on, is
passed to the Command, (as part of the Command Line) by windoze.
but that's not at a command prompt.

and if I'm going to open a Command Prompt window, I can type
dir D:path\to\folder >dirlist
more easily than cd D:path\to\folder<return>
dir >dirlist

Yep, maybe, but see above.

The idea of doing it from the normal RightClick (Context) Menu,
is that you don't actually have to type anything!...

Yes, but the above was about doing it at a command prompt.

<snip>

Chances are I'll already have that folder open when I decide
I really could do with an editable listing.

Do you mean "Open in (windoze) Explorer?
Or "Open in a Command Prompt Window?

In explorer; if I had a Command Window open, I could just type
dir >dirlist


Either way - if you have a windoze Explorer Window Open, you can
use RightClick>SendTo DirPrint (or DirList)

Not on Win98 (there's no Send To in the empty parts of the window, just
on icons/filenames) Is there on XP?


Or - if you have a Comamnd Prompt Window Open, you can use the same
Batch File to do the Listing/Printing,

Except that it's not in the path, and if you fix *that*, the exit at the
end closes the Command Window, so you've got to start a secondary command
prompt

which Saves you the "tedium"/ "Hassle"<g> of Typing the whole Command
out, each time you want to do it.

Since the introduction of DOSkey, that hassle has been much reduced.

<snip>

& you (& here I do mainly mean you, Ali - cos I know not many other
people use Perl), you can use the same basic principles to call up
a Perl Script/Program (or a JScript or VBScript), from within windoze
Explorer, passing it the Directory or FileName(s) as parameters.

I may do that, so I can set the parameters to dir.


& Perl (& JScript/VBSCript) can do a whole lot more things than
a Plain & Simple Batch File.

Though having said that, the WinXP (& Win2K) Command Interpreter
& Batch Files are very much more capable of all sorts of things
than the original MSDOS Batch Files.

I've noticed, but since the recreational machine runs 98, that's not very
useful to me.


--
Ali
http://homepage.ntlworld.com/my.web.pages/ Don't go there.
UPS/FUNTO March stats: http://homepage.ntlworld.com/my.web.pages/stats
Four years' statistics now available.
.



Relevant Pages

  • Re: USB drive problem
    ... Once per month I update the files using a batch file ... using this context for the copy command: ... that folder. ... The first problem I see is that there is no U or S switch for COPY. ...
    (alt.comp.hardware.pc-homebuilt)
  • Re: batch question
    ... window at great speed, without being executed. ... all I want is for the command to work inside a command prompt window. ... Your original batch file had two lines. ... you fell into a well-known trap: you are not executing ping.exe ...
    (microsoft.public.windowsxp.general)
  • Re: Ways to get a Directory Listing in a Text File, or Printed out - Re: Web site directories
    ... Use the CD Command, in a Command Prompt Window ... That doesn't specify a folder, just changes to the specified folder, ... if yo ucall up a Script (or Batch File) by using the *RightClick* ...
    (uk.people.silversurfers)
  • Re: Batch File Problem - Batch File Enclosed
    ... I have added a batch file to my Startup folder to execute whenever ... The batch file works ok but it leaves a blank command ... I would like close this window using the batch file ...
    (microsoft.public.windowsxp.general)
  • Re: Execute a batch file and wait for it to complete
    ... and until I manually close the console. ... Starts a separate window to run a specified program or command. ... If it is an internal cmd command or a batch file then ...
    (comp.lang.fortran)