![]() Sawny suggested a simple modification to loftysnake’s answer Works for the current directory but does not search subfolders. The accepted answer to this question, by loftysnake, If /i "%folder:~0,1%" NEQ "d" LwrCase_Folder - %1 is NOT a folder.&endlocal&goto :EOFįor /f "Tokens=*" %%f in ('dir %sw%') do ( ![]() If not exist %1 LwrCase_Folder - %1 NOT found.&goto :EOF If Syntax: LwrCase_Folder FullyQualifiedDirectoryName&goto :EOF NOTE: LwrCase.bat makes use the the /L switch of the DIR command, which returns lower case names. Where FullyQualifiedDirectoryName is the fully qualify folder path, and /S is an optional parameter that will also rename files names in all sub-folders. ![]() To rename all the files names in a directory, use: LwrCase_Folder FullyQualifiedDirectoryName Where FullyQualifiedFileName is the fully qualified file name to be renamed. To rename a file name to lower case, use: LwrCase FullyQualifiedFileName Using only standard commands, I have scripted LwrCase.bat and LwrCase_Folder.bat, to rename a file name to lower case, or rename all file names in a folder to lower case.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |