Best Regards,
Pai Yili
Pai Lum Family Martial Arts
<URL:http://www.users.fast.net/~paiyili/>
Windows 3.1 and '95 Tips and Tweaks!
I haven't answered up to now because I don't run Win95 so I can't test
the approach I have in mind. But, since noone else seems to have an
idea I thought I'ld tell you what I know.
I have played with the DIR /L switch a little in the past and know it
can be used to give you a lowercase version of a file's name. What I
don't know is whether you can actually affect the FAT's version of the
file name. However, if COPY and XCOPY preserve the file name's case,
then it may be possible. As I said, I just can't test it.
Below is a batch file that will convert a file name from upper to lower
case. I have tested it in DOS 6.2. You're on your own as far as making
do what you want.
:: LOWER.BAT - A routine that converts a file name to lowercase.
:: Tom Lavedas <k...@deltaelectronics.com>
::
@echo %dbgl% off
%2 if [%1]==[] %0 *.*
%2 for %%v in (%1) do call %0 %%v ::
%2 for %%v in (del goto:End) do %%v ente?.bat
> enter.bat echo ECHO REN %1 "%%4"
> ente}.bat dir %1 /l /b
>>ente}.bat echo.
> ente}.bat date < ente}.bat | find "Ent"
ente}
:End
The routine takes an optional filename argument (which may or may not
need to be capitalized). The filename can have wildcard characters.
You will need to modify the capitalized part of the eighth line to match
your requirements. It may be that this may be as simple as removing the
capped ECHO to activate the REN statement. As it is it simply echos
'REN FILENAME "filename"' to the console. I enclosed the lowercase
filename in quotes in the hope that it will force Win95 to take the file
name literally (not capitalize it).
Let me know how it works out.
Tom Lavedas
-----------
Delta Electronics, Inc.
http://www.deltaelectronics.com
XSET Web page: http://members.tripod.com/~marcstern/xset.htm
Pai Yili <pai...@fast.net> wrote in article <5c5obk$9...@news1.fast.net>...
:: LOWER.BAT - A routine that converts a file name to lowercase.
:: Tom Lavedas <k...@deltaelectronics.com>
::
@echo %dbgl% off
%2 if [%1]==[] %0 *.*
%2 for %%v in (%1) do call %0 %%v ::
%2 for %%v in (del goto:End) do %%v ente?.bat
> enter.bat echo REN %1 "%%4"
> ente}.bat dir %1 /l /b
>>ente}.bat echo.
> ente}.bat date < ente}.bat | find "Ent"
ente}
:End
Best Regards,
generally,
conversion of text files to another case
is easily done using tr or sed
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
for a 1stop sed needs, join seders, the informal sed mailing list.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
af...@torfree.net seders informal mailing list & moderator
alt.comp.editors.batch seders news group (more than just sed),
hosted by a seder,
Yiorgos.
http://www.wollery.demon.co.uk seders grab bag (seders official web page)
hosted by a seder,
Casper.
http://www.math.fu-berlin.de/~guckes/sed/ run by a seder, Herr Guckes
http://www.math.fu-berlin.de/~leitner/sed/ run by a seder, Herr Leitner
http://www.dbnet.ece.ntua.gr/~george/#seders seder, engineer, Dr2b Yiorgos
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
=-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
al aab, seders moderator sed u soon
it is not zat we do not see the s o l u t i o n
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+