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



"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.

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!...

The Name of (Path to) the Folder (Directory) is passed to the
Comamnd (Batch File/Script) & the actual Command (or series of
Commands to do the Listing/Printing) is in the Batch File/Script.

Or just use Right Click on the Directory (Folder) that you want to
get a Listing of (to Print or Edit or whatever) & the Directory
(Folder) Name will be passed to any Script or Batch File that you
call up from the Context Menu.

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?

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

Or - if you have a Comamnd Prompt Window Open, you can use the same
Batch File to do the Listing/Printing, which Saves you the "tedium"/
"Hassle"<g> of Typing the whole Command out, each time you want to
do it.

Here are some examples, which do basically the same thing as the
equivalent Script Folder Action in Apple Mac OS X...

<snip links>

& there are other, easier & quicker ways to get a Directory Listing
- you don't actually need to Faff around Adding "Folder Actions"
&/or Editing the Registry, like those Articles (& lots of similar
Articles on various WebSites) say...
<snip>
Where the Batch Files are...

DirList.bat

rem Batch File to Create a List of the Contents of a Directory,
rem in a temporary File & Open up that temporary File in Notepad.

@echo off
dir %1 /-p /a /o:gn > "%temp%\DirList.txt"
start /w notepad "%temp%\DirList.txt"
del "%temp%\DirList.txt"
exit

That could be useful, thanks

Yep - they can be *very* useful!!!

But I'm sure a lot of people will have taken one look at it (this
Thread) & turned away (& thus missed out on it)
:-(

Simply cos it contains the word(s) "Batch File" &/or "Script"
& "Command".
:-(

HTH

It did.

& 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.

& 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.

--
pmj


.



Relevant Pages

  • Re: Undeletable file
    ... >> I tried to delete it with command MS-DOS but without results. ... Try and move the undeletable file into the newly created folder. ... In the command prompt window, ... Run DOS, not a DOS session so it doesn't get loaded. ...
    (microsoft.public.windowsxp.general)
  • Re: How to copy whole folders?
    ... First of all your syntax is different than xcopy help shows: ... I want just to move my batch file from one folder to another and run it ... error and restart the same xcopy command until all files are copied. ...
    (microsoft.public.windows.file_system)
  • Re: XCopy Exclude Function NOT Working
    ... folder that I would like to exclude. ... some other Xcopy command as well the trouble command line follows along ... with the contents of the exclude file list. ... Batch file command: ...
    (microsoft.public.windowsxp.general)
  • Re: Undeletable file
    ... > I tried to delete it with command MS-DOS but without results. ... Try and move the undeletable file into the newly created folder. ... In the command prompt window, ...
    (microsoft.public.windowsxp.general)
  • RE: Locating corrupt driver
    ... This article describes the functionality and limitations of the Windows ... Create and format partitions on drives. ... MB of hard disk space on your system partition to hold the Cmdcons folder ... Windows NTBoot Console Command Interpreter. ...
    (microsoft.public.win2000.applications)