Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

echo subdir names

4 views
Skip to first unread message

CRNG

unread,
May 23, 2014, 6:50:39 AM5/23/14
to
Hello,
I'm using TCC 9.02.151 on Windows XP and have a bunch of subdirs
that I would like to echo. Here are the subdirs I'm using as an
example:

.. <DIR> 5/23/14 5:43
2014-02-24 <DIR> 2/24/14 14:21
2014-03-16 <DIR> 3/16/14 8:09
2014-03-29 <DIR> 3/29/14 15:43
2014-04-03 <DIR> 4/03/14 12:36
2014-04-15 <DIR> 4/15/14 8:17
2014-04-24 <DIR> 4/24/14 13:24
2014-05-14 <DIR> 5/14/14 14:28
2014-05-18 <DIR> 5/18/14 9:33

I've tried

for %f in 2014* echo %f
for /a:d %f in 2014* echo %f

but neither work and I haven't a clue as to what to try next. Any
suggestions?

Thanks
--
Web based forums are like subscribing to 10 different newspapers
and having to visit 10 different news stands to pickup each one.
Email list-server groups and USENET are like having all of those
newspapers delivered to your door every morning.

Stan Brown

unread,
May 23, 2014, 7:04:40 PM5/23/14
to
On Fri, 23 May 2014 05:50:39 -0500, CRNG wrote:
>
> Hello,
> I'm using TCC 9.02.151 on Windows XP and have a bunch of subdirs
> that I would like to echo. Here are the subdirs I'm using as an
> example:
>
> .. <DIR> 5/23/14 5:43
> 2014-02-24 <DIR> 2/24/14 14:21
> 2014-03-16 <DIR> 3/16/14 8:09
> 2014-03-29 <DIR> 3/29/14 15:43
> 2014-04-03 <DIR> 4/03/14 12:36
> 2014-04-15 <DIR> 4/15/14 8:17
> 2014-04-24 <DIR> 4/24/14 13:24
> 2014-05-14 <DIR> 5/14/14 14:28
> 2014-05-18 <DIR> 5/18/14 9:33
>
> I've tried
>
> for %f in 2014* echo %f
> for /a:d %f in 2014* echo %f
>
> but neither work and I haven't a clue as to what to try next. Any
> suggestions?
>
> Thanks

From memory: The file specs have to be enclosed in parentheses:
(2014*)

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com
Shikata ga nai...

CRNG

unread,
May 24, 2014, 5:51:00 AM5/24/14
to
On Fri, 23 May 2014 19:04:40 -0400, Stan Brown
<the_sta...@fastmail.fm> wrote in
<MPG.2de99e165...@news.individual.net>

>On Fri, 23 May 2014 05:50:39 -0500, CRNG wrote:
>>
>> Hello,
>> I'm using TCC 9.02.151 on Windows XP and have a bunch of subdirs
>> that I would like to echo. Here are the subdirs I'm using as an
>> example:
>>
>> .. <DIR> 5/23/14 5:43
>> 2014-02-24 <DIR> 2/24/14 14:21
>> 2014-03-16 <DIR> 3/16/14 8:09
>> 2014-03-29 <DIR> 3/29/14 15:43
>> 2014-04-03 <DIR> 4/03/14 12:36
>> 2014-04-15 <DIR> 4/15/14 8:17
>> 2014-04-24 <DIR> 4/24/14 13:24
>> 2014-05-14 <DIR> 5/14/14 14:28
>> 2014-05-18 <DIR> 5/18/14 9:33
>>
>> I've tried
>>
>> for %f in 2014* echo %f
>> for /a:d %f in 2014* echo %f
>>
>> but neither work and I haven't a clue as to what to try next. Any
>> suggestions?
>>
>> Thanks
>
>From memory: The file specs have to be enclosed in parentheses:
>(2014*)

That's it Stan.

for /a:d %f in (2014*) echo %f

works perfectly. Thanks for your help.

Stan Brown

unread,
May 25, 2014, 7:37:40 AM5/25/14
to
On Sat, 24 May 2014 04:51:00 -0500, CRNG wrote:
>
> On Fri, 23 May 2014 19:04:40 -0400, Stan Brown
> <the_sta...@fastmail.fm> wrote in
> <MPG.2de99e165...@news.individual.net>
>
> >On Fri, 23 May 2014 05:50:39 -0500, CRNG wrote:
> >> I've tried
> >>
> >> for %f in 2014* echo %f
> >> for /a:d %f in 2014* echo %f
> >>
> >> but neither work and I haven't a clue as to what to try next. Any
> >> suggestions?
> >
> >From memory: The file specs have to be enclosed in parentheses:
> >(2014*)
>
> That's it Stan.
>
> for /a:d %f in (2014*) echo %f
>
> works perfectly. Thanks for your help.

Thanks for following up!

Myron A. Calhoun

unread,
May 30, 2014, 9:25:33 AM5/30/14
to
>I'm using TCC 9.02.151 on Windows XP and have a bunch of subdirs
>that I would like to echo. Here are the subdirs I'm using as an
>example:
> ....[snip]....

I don't understand what you mean by "echo a subdirectory"?
Display the subdirectory names?
Display the names of the files in each subdirectory?
Display the contents of the files in each subdirectory?
--
-- Myron A. Calhoun.
Five boxes preserve our freedoms: soap, ballot, witness, jury, and cartridge
NRA Life Member & Certified Instructor for Rifle, Pistol, & Home Firearm Safety
Also Certified Instructor for the Kansas Concealed-Carry Handgun (CCH) license

CRNG

unread,
May 30, 2014, 2:38:56 PM5/30/14
to
On Fri, 30 May 2014 13:25:33 +0000 (UTC), Myron A. Calhoun
<mcal...@sdf.org> wrote in <lma0sc$qd5$1...@odin.sdf-eu.org>

>>I'm using TCC 9.02.151 on Windows XP and have a bunch of subdirs
>>that I would like to echo. Here are the subdirs I'm using as an
>>example:
>> ....[snip]....
>
>I don't understand what you mean by "echo a subdirectory"?
>Display the subdirectory names?
>Display the names of the files in each subdirectory?
>Display the contents of the files in each subdirectory?

Yes, display the sudirectory names, as the subject line states. The
solution was provided by Stan Brown:

for /a:d %f in (2014*) echo %f

where "2014" are the first 4 characters of a bunch of subdirectory
names, e.g. 2014-02-24, 2014-03-16, etc.
0 new messages