Discussion:
echo subdir names
(too old to reply)
CRNG
2014-05-23 10:50:39 UTC
Permalink
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
2014-05-23 23:04:40 UTC
Permalink
Post by CRNG
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
.. <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
2014-05-24 09:51:00 UTC
Permalink
On Fri, 23 May 2014 19:04:40 -0400, Stan Brown
Post by Stan Brown
Post by CRNG
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
.. <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
(2014*)
That's it Stan.

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

works perfectly. Thanks for your help.
--
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
2014-05-25 11:37:40 UTC
Permalink
Post by CRNG
On Fri, 23 May 2014 19:04:40 -0400, Stan Brown
Post by Stan Brown
Post by CRNG
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?
(2014*)
That's it Stan.
for /a:d %f in (2014*) echo %f
works perfectly. Thanks for your help.
Thanks for following up!
--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com
Shikata ga nai...
Myron A. Calhoun
2014-05-30 13:25:33 UTC
Permalink
Post by CRNG
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
....[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
2014-05-30 18:38:56 UTC
Permalink
On Fri, 30 May 2014 13:25:33 +0000 (UTC), Myron A. Calhoun
Post by Myron A. Calhoun
Post by CRNG
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
....[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.
--
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.
Loading...