How can I rename 1..n file with ANT? I would like to rename any files with xxxx.default.properties
to xxxx.local.properties
.
Thank you.
Select multiple files in a folder. To do so, press and hold down the CTRL key while you are clicking files. After you select the files, press F2. Type the new name, and then press ENTER.
You can press and hold the Ctrl key and then click each file to rename. Or you can choose the first file, press and hold the Shift key, and then click the last file to select a group.
To batch rename files, just select all the files you want to rename, press F2 (alternatively, right-click and select rename), then enter the name you want on the first file. Press Enter to change the names for all other selected files.
You can batch rename images in Windows by selecting (Shift+click or Ctrl+click to select several files; Ctrl+A to select all) and pressing right-click > "Rename". Your file names will look like image (1), image (2), image (3) etc.
Using the move task you could do something like this:
<move todir="my/src/dir" includeemptydirs="false">
<fileset dir="my/src/dir"/>
<mapper type="glob" from="*.default.properties" to="*.local.properties"/>
</move>
Give it a try and let us know.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With