TIP: Click on subject to list as thread! ANSI
echo: 4dos
to: Dave Degear
from: John Thompson
date: 1998-09-28 18:24:00
subject: JPG -- TXT naming

In a message to All, Dave DeGear wrote re: JPG --> TXT naming

DD>   I have a collection of JPG files and I would like to have a separate .TXT
DD> file associated with each of them.  For example if I have a directory
DD> containing 1.jpg, 2.jpg, 3.jpg, how would I also create a set of files
DD> (preferably empty) in that directory that are named 1.txt, 2.txt, 3.txt that
DD> are less than 1 or 2 bytes each in size?

for %a in (*.jpg) echos>%{at}name[%a].txt

This will create a zero-byte .txt file for every .jpg in the 
current directory.  Note you need to use "echos" (not "echo") to 
get a zero-byte file, and the square brackets around %a in the 
{at}name variable function.  If you don't use the square brackets 
you will get a syntax error.
 
DD>   Also, is there a way to convert a directory containing filenames
in upper and
DD> lower case into filenames that are only uppercase? I'm running Warp 4 with
DD> 4OS2/32 Version 2.5 and 4DOS Ver 4.02.

for %b in (*) ren %b %{at}upper[%b]

Same caveat here about the square brackets in the %{at}upper 
variable function.

Enjoy...you owe me some Nanaimo bars...  :-)

 * KWQ/2 1.2i * Internet: John.Thompson{at}ibm.net


--- PCBoard (R) v15.3/M 10
* Origin: Spare Parts BBS - Appleton WI (920-731-7697) (1:139/0)
SEEN-BY: 396/1 632/0 371 633/260 267 270 371 635/506 728 639/252
@PATH: 139/625 3615/50 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.