Consulting

Results 1 to 3 of 3

Thread: CHANGE THE FILE NAME CASE IN WINDOWS.

  1. #1

    CHANGE THE FILE NAME CASE IN WINDOWS.

    hi,
    I am trying to get a batch file to change the file name to upper case. I found some code to change upper to lower. I dont know anything about coding

    I am looking for two code, one is to "change file name to upper case. Example :myfile" should be "MYFILE"
    another is change the starting later of file name to upper case. Example :myfile" should be "Myfile"

    code to change to lower case:
    [VBA]@echo off
    if .%1==./? (
    echo Changes all filenames in the given dir to lowercase
    echo.
    echo %~n0 dir [/s]
    echo.
    echo dir The directory.
    echo /s Include subdirectories of 'dir'.
    goto :EOF)
    setlocal
    pushd %1
    if .%2==. (
    set DIRCMD=/L/B
    echo Rename all filenames in %1 to lowercase filenames?&goto :Anykey
    ) else if /i .%1==./S (
    set DIRCMD=/L/B/S/A-D
    echo Rename all filenames in %1 and its subdirs to lowercase filenames?&goto :Anykey
    ) else (
    echo Invalid switch: %*&goto :End)
    :Anykey ---------------------------------------------------------------
    for /f "tokens=*" %%F in ('dir/s') do move "%%F" "%%F"
    :End ------------------------------------------------------------------
    popd&endlocal&goto :EOF[/VBA]

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    What do you want this done in, Excel, Word, or what?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    I want to run this .bat file on windows explorer, so it will convert the file name to upper case.

    thnaks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •