74 ~ mkdir -pv test
mkdir: created directory 'test'
74 ~ cd test
74 test touch 10005.png 58456.png 48546.png 85456.png
74 test ls
10005.png 48546.png 58456.png 85456.png
74 test amm
Picked up _JAVA_OPTIONS: -Dsun.java2d.opengl=true
Loading...
Welcome to the Ammonite Repl 2.0.4 (Scala 2.13.1 Java 1.8.0_252)
@ import $ivy.`com.lihaoyi::ammonite-ops:2.0.4`; import ammonite.ops._
import $ivy.$ ;
import ammonite.ops._
@ (ls! pwd).foreach { x => mv.over(x, pwd/s"${x.baseName.toInt + 10}.${x.ext}") }
@ ls! pwd
res2: LsSeq =
"10015.png" "48556.png" "58466.png" "85466.png"
@ Bye!
74 test ls
10015.png 48556.png 58466.png 85466.png
74 test
【 在 javame (javame) 的大作中提到: 】
: 以数字命名的文件批量重命名,新名字用老名字做加减法得来
: 比如文件名是
: 10005.png
: ...................
--
FROM 183.14.30.*