🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.editors.batch
Article #3

Re: How to modify this batch file, anyone know?

#3
From: Ben Myers
Date: Wed, 02 Jun 2010 15:10
131 lines
6527 bytes
"Fairfax" <SpamNot@NoJunkMail.org> wrote in message news:524c06lg8ud2eltqts3ridl5cq28bqj38n@4ax.com...
> From this page here, there's a "print directory" batch file that one
> puts in the SendTo folder that works quite well.
> 
> The batch file is this:
> **********************************************
>     @echo Directory and sub-directory file listing dump by
> RenegadeMinds.com.
>     @echo Visit http://Renegademinds.com for more Windows tips and
> tricks
>     @echo and free software applications.
>     @echo
> ==================================================================
>     @echo
> ==================================================================
>     @echo Save this file as getDirList.bat in your SendTo directory.
>     @echo SendTo is under Documents and Settings in each user's
> directory.
>     @echo Right-click on any directory in Windows Explorer and choose
>     @echo Send To - getDirList.bat
>     @echo
> ==================================================================
>     @echo
> ==================================================================
>     @echo Dumping directory listing to c:\dirListing.txt
>     @echo        (This may take some time for large directory trees.)
>     @REM the /A switch lists all hidden and system files as well.
>     @REM the /S switch lists all subdirectories and their contents.
> REM original line:    @dir %1 /A /S > c:\dirListing.txt
>     @dir %1 /S > c:\dirListing.txt
>     @echo Opening c:\dirListing.txt in Notepad (Close notepad to
> delete file)
>     @notepad c:\dirListing.txt
>     @echo Deleting c:\dirListing.txt
>     @del c:\dirListing.txt
>     @pause 
> **********************************************
> (I removed the "/A", as can be seen above, so that I don't get the
> hidden and system files listed.)
> 
> 
> 
> 
> This gives this type of output:
> 
>  Directory of C:\WINDOWS\pchealth\helpctr\System\images\16x16
> 
> 2009.12.11  17:07    <DIR>          .
> 2009.12.11  17:07    <DIR>          ..
> 2009.12.11  17:07             2,358 arrow_blue_normal_shadow.bmp
> 2009.12.11  17:07             2,358 arrow_green_normal_shadow.bmp
> 2009.12.11  17:07             1,078 compat.bmp
> 2009.12.11  17:07             1,078 errmsg.bmp
> 2009.12.11  17:07             1,078 support.bmp
> 2009.12.11  17:07             1,078 tools.bmp
> 2009.12.11  17:07             1,078 update.bmp
> 2009.12.11  17:07               600 warning.gif
>                8 File(s)         10,706 bytes
> 
> 
> 
> 
> 
> As compared to the output that an app did:
> 
>    C:\WINDOWS\pchealth\helpctr\System\images\16x16
>    ==============================================
>    arrow_blue_normal_shadow.bmp
> 2 KB   2009.12.11 05:07:38 PM      a 
>    arrow_green_normal_shadow.bmp
> 2 KB   2009.12.11 05:07:38 PM      a 
>    compat.bmp
> 1 KB   2009.12.11 05:07:38 PM      a 
>    errmsg.bmp
> 1 KB   2009.12.11 05:07:38 PM      a 
>    support.bmp
> 1 KB   2009.12.11 05:07:38 PM      a 
>    tools.bmp
> 1 KB   2009.12.11 05:07:38 PM      a 
>    update.bmp
> 1 KB   2009.12.11 05:07:38 PM      a 
>    warning.gif
> 1 KB   2009.12.11 05:07:38 PM      a 
> 
>    Total 8 file(s);  Size: 10706 Byte(s)
> 
> 
> 
> They both lack.  The one below looks awful due to word wrap on my
> newsreader's interface but it is the better of the two since it
> doesn't have all the extra, parent <DIR> references.  Yet the second
> doesn't have date or size or time of the files.
> 
> So I think I'll stick with the batch file, instead.
> 
> However, what I don't know how to do, or if it's even possible to do,
> is to have the batch file leave out all these types of annoying
> references:
> 
> 
> 2009.12.11  17:07    <DIR>          .
> 2009.12.11  17:07    <DIR>          ..
> 
> 
> I'm getting a directory printing of a network files that turned out to
> have thousands of entries.  I could eliminate hundreds of lines if I
> could keep all these <DIR> lines out of the final output.
> 
> Does anyone know how to modify the batch file above so that these
> don't appear?  thx

Try this:

@dir  %1  /S  /A-D-H-S  >  c:\dirListing.txt

Ben
Technical Details
Message-ID: <e4WdnSwbhpP_6ZvRnZ2dnUVZ_hGdnZ2d@earthlink.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail
References: <524c06lg8ud2eltqts3ridl5cq28bqj38n@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 4e777fa27a,8acf0aabf748096d
X-Google-Attributes: gid4e777fa27a,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 02 Jun 2010 10:10:25 -0500
From: "Ben Myers" <benjmyers@REMOVEmindspring.com>
Newsgroups: alt.comp.editors.batch,24hoursupport.helpdesk
References: <524c06lg8ud2eltqts3ridl5cq28bqj38n@4ax.com>
Subject: Re: How to modify this batch file, anyone know?
Date: Wed, 2 Jun 2010 11:10:23 -0400
MIME-Version: 1.0
Content-Type: text/plain;
 charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <e4WdnSwbhpP_6ZvRnZ2dnUVZ_hGdnZ2d@earthlink.com>
Lines: 131
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 4.248.60.33
X-Trace: sv3-Oc0CVo+5hr/L3oWmZHofUWV4Qfvss6wFNFR7MpyR+MnvhP8ktJgFbN2kje+hLkDL+FkabQ8TVKb4vIs!q8jXVIfUgQ/Riu6/iLjZmgdB9Sr4ATS7khNzTpHPwMuZ8bb6ro+rPW+4bTVrzdMHoMWTxlIIt4Ua!Mi9ATkUAUJ04x8m2JPvXQjasnGvTeHjRVg==
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40