简体   繁体   中英

Batch script to rename and move files

I have a radio management system which is capable of running batch scripts after shows.

I'm looking for a batch script file that renames any file in the directory like so:

1.mp3 --> [Replay]1.mp3

And then move the file from folder a to folder b.

Any thoughts on how do i go about creating such script in a syntax level?

干得好

ren *.mp3 [Replay]*.*

There are many ways to do what you request, this script does that by searching all mp3 files in the current folder and move them to folderb specifying a new name.

@ECHO off

FOR %%i IN (*.mp3) DO (
  MOVE "%%i" "folderb\[Replay]%%i"
)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM