Author Topic: converting many filenames to all caps  (Read 1902 times)

0 Members and 1 Guest are viewing this topic.

ELOQUINTET

  • Guest
converting many filenames to all caps
« on: September 01, 2005, 08:05:32 PM »
i am looking for an application to convert alot of file names to caps for batch scripting. anybody know of anything?

whdjr

  • Guest
converting many filenames to all caps
« Reply #1 on: September 01, 2005, 10:20:02 PM »
Dan,

If you have any Photo editing software or Digital Camera Download software you might try to use one of those.  A lot of times they have this capability in their batch processing features.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
converting many filenames to all caps
« Reply #2 on: September 02, 2005, 12:27:21 AM »
Download this zip file.

Within it is a DOS executable called fcase.exe. Put it in your system path so it can be called from any location.

You use it (at DOS) by passing it a filename and /u for uppercase or /l for lowercase. If you don't give it the /u or /l parameter it assumes uppercase.

If you pass it no arguments or include a /h or /? (or pass both /u and /l) it will display this little help screen:

Syntax: FCASE filename.ext [/u] [/l]
/u = upper case (the default)
/l = lower case


So, within a batch file you might use it like this to rename all the AutoCAD drawings in the current directory to uppercase:

for %%f in (*.dwg) do fcase.exe %%f /u

Or at the DOS command line:

for %f in (*.dwg) do fcase.exe %f /u

Do note that you need double percent signs (%%) when using the DOS FOR command in a batch file; at the command line only single percent signs are required.

The DOS FOR command is quite flexible and will allow you to process child directories recursively; I'll let you do some reading (I gotta call it quits here tonight).

Test it out on some dummy files first, it was written and tested pretty quick under WinXP Pro; I don't claim to be the brightest bulb this evening.

DOS Command line example:

for %f in (*.dwg) do fcase.exe %f /u

fcase.exe Blocks and Tables - Imperial.dwg /u
=> BLOCKS AND TABLES - IMPERIAL.DWG

fcase.exe Blocks and Tables - Metric.dwg /u
=> BLOCKS AND TABLES - METRIC.DWG

fcase.exe Colorwh.dwg /u
=> COLORWH.DWG

fcase.exe DB_Samp.dwg /u
=> DB_SAMP.DWG

fcase.exe Hotel Model.dwg /u
=> HOTEL MODEL.DWG

fcase.exe Hummer Elevation.dwg /u
=> HUMMER ELEVATION.DWG

fcase.exe Lineweights.dwg /u
=> LINEWEIGHTS.DWG

...
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Troy Williams

  • Guest
converting many filenames to all caps
« Reply #3 on: September 02, 2005, 08:03:06 AM »
Here is one that I use. You can name your files pretty much anything you want.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
converting many filenames to all caps
« Reply #4 on: September 02, 2005, 10:21:33 AM »
FCASE.EXE (in zip file) updated:

Code: [Select]
FCASE.EXE, a utility to change the case of a file name.
FCASE.EXE filename.exe [/u] [/l] [/m] [/a]
Where /u = upper case, e.g. FILE NAME.EXT (the default)
      /l = lower case, e.g. file name.ext
      /m = mixed case, e.g. File Name.Ext
      /a = about/disclaimer

Last update 2005/09/02 (MP).
Includes warts, pimples and errors.
Please test on dummy files before using.
Nominally tested under Windows XP Pro, SP2
Use at your own risk.
Contact: mp@cadlabs.com
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
converting many filenames to all caps
« Reply #5 on: September 02, 2005, 10:57:28 AM »
Updated again.

Note that the program's output uses stdout, so it supports (doesn't mean you have to utilize it) redirection to a file, for example:

(DOS Command Line)

for %f in (*.dwg) do fcase.exe %f /m >> fcase.txt

Afterwards fcase.txt might contain this data:

blocks and tables - imperial.dwg => Blocks And Tables - Imperial.Dwg
blocks and tables - metric.dwg => Blocks And Tables - Metric.Dwg
colorwh.dwg => Colorwh.Dwg
db_samp.dwg => Db_Samp.Dwg
hotel model.dwg => Hotel Model.Dwg
hummer elevation.dwg => Hummer Elevation.Dwg
lineweights.dwg => Lineweights.Dwg
plot screening and fill patterns.dwg => Plot Screening And Fill Patterns.Dwg
stadium north elevation.dwg => Stadium North Elevation.Dwg
tablet.dwg => Tablet.Dwg
taisei detail plan.dwg => Taisei Detail Plan.Dwg
taisei door window sheet.dwg => Taisei Door Window Sheet.Dwg
taisei interior elv.dwg => Taisei Interior Elv.Dwg
truetype.dwg => Truetype.Dwg
welding fixture model.dwg => Welding Fixture Model.Dwg
welding fixture-1.dwg => Welding Fixture-1.Dwg


Be careful when redirecting output, the program assumes you know what you're doing.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Andrea

  • Water Moccasin
  • Posts: 2372
converting many filenames to all caps
« Reply #6 on: September 02, 2005, 05:41:53 PM »
I use "FileRenamer pro"

you can find it on the NET.
Keep smile...