SubStringRename is a command-line Java software that will search for a particular string in a file name and replace it with another string. This software understands standard file specification masks, so you can execute it on a number of files at once. Because SubStringRename is written as a command-line utility, it can be used in custom batch files and custom scripts. SubStringRename is written in Java, so it will run on any Java-supported operating system.
SubStringRename takes advantage of the CI Class Package 5.4 or newer. You will have to download the package and install it if you don't have it already.
SubStringRename is distributed as Freeware. Please see the "Freeware License Agreement" elsewhere on this site.
java SubStringRename "srch str" "repl str" "file 1" [ ... "file n" ]
Substituting the "dscn" prefix with "pict" in all jpg files:
java SubStringRename "dscn" "pict" *.jpg
dscn0038.jpg -> pict0038.jpg
Changing file name extension from "txt" to "html":
java SubStringRename "txt" "html" *.txt
19980206_0042.txt -> 19980206_0042.html
Attached File: SubStringRename.class
Made bug fixes and improvements to the SubStringRename Java class. In this release, this utility now supports:
1) Directory specification as part of the file specification.
The following example shows what you can do now. The new version is attached below.
Substituting the "dscn" prefix with "pict" in all jpg files within the "\\server\transfer" directory:
java SubStringRename "dscn" "pict" "\\server\transfer\*.jpg"
\\server\transfer\dscn0038.jpg -> pict0038.jpg
Did your message disappear? Read the Forums FAQ.
Spam Control | * indicates required field
TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.
No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.
Messages, files, and images copyright by respective owners.
81 Users Online
Copyright © 1996 - 2023. All Rights Reserved.