0

I want to rename a file from

Chat WhatsApp dengan A3 - 21.mp4
Mine.mp4
MoviMax_MV1_V016_2.106.001_20150227_2030_fbf.mp4
bedrock_server.mp4

to

test1.mp4
test2.mp4
test3.mp4
test4.mp4

How can I do it?

1
  • Are any of the existing files named as test1.mp4, test2.mp4, etc.? – rowboat Dec 29 '20 at 6:53
1
LC_COLLATE=C n=0 sh -c '
for i in ./*.mp4; do echo mv "$i" "test$((n+=1)).mp4"; done'

Remove echo if the printed actions are correct

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.