PC Review


Reply
Thread Tools Rate Thread

Directory Listing

 
 
Justin Fancy
Guest
Posts: n/a
 
      14th Nov 2006
Hi Everyone,

I need a command that will produce me all .ASP files in a specific
directory that also have the file "webconfig.asax" contained within the
folder. I know the "dir" command will generate me a list but i'm not
sure about narrowing it down the way I want it to.

Justin

 
Reply With Quote
 
 
 
 
billious
Guest
Posts: n/a
 
      14th Nov 2006

"Justin Fancy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Everyone,
>
> I need a command that will produce me all .ASP files in a specific
> directory that also have the file "webconfig.asax" contained within the
> folder. I know the "dir" command will generate me a list but i'm not
> sure about narrowing it down the way I want it to.
>
> Justin
>


Oh poor princess!


----- batch begins -------
[1]@echo off
[2]for /f %%i in ( ' dir /s /b /a-d ".\reltree\webconfig.asax" ' ) do if
exist "%%~dpi*.asp" dir "%%~dpi*.asp"
------ batch ends --------

Lines start [number] - any lines not starting [number] have been wrapped
and should be rejoined. The [number] that starts the line should be removed
The spaces surrounding the single-quotes are for emphasis only. The SPACES
are not required but the single-quotes ARE required.

..\reltree
is the relative root of the tree to search.


 
Reply With Quote
 
foxidrive
Guest
Posts: n/a
 
      15th Nov 2006
On 14 Nov 2006 05:10:39 -0800, "Justin Fancy" <(E-Mail Removed)>
wrote:

>I need a command that will produce me all .ASP files in a specific
>directory that also have the file "webconfig.asax" contained within the
>folder. I know the "dir" command will generate me a list but i'm not
>sure about narrowing it down the way I want it to.


This is untested:


@echo off
for /f "delims=" %%a in ('dir "c:\webconfig.asax" /b /s /a-d') do (
dir "%%~dpa\*.asp" /b /s /a-d >>file.log
)

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Listing Active Directory groups that have directory access rights cwhankey@gmail.com Microsoft Excel Programming 0 17th Oct 2008 03:13 PM
Directory listing Bampah Microsoft Excel Misc 4 19th Jan 2006 03:25 PM
directory listing =?Utf-8?B?SWFuIEI=?= Microsoft Access Form Coding 3 11th Aug 2005 09:42 PM
How to get a listing of ACL for a directory ? Cedric Windows XP Security 0 19th Apr 2005 03:01 PM
Directory listing Todd Lu Microsoft ASP .NET 2 31st Aug 2004 04:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:14 AM.