How to rename multiple file at once using Python simple script

preview_player
Показать описание
On of the fastest way to rename any files as you like, splitting strings in Python and combine them to get new name format( in this case without dots and unwanted letters after year).

source:

import os
if ".m" in f :

nf1=nf[0]
if "." in nf1:
nf1=new
#print(nf1)

part2=nf[1].split(".")
#print(part2)
year="20"+part2[0]
#print(year)

newname=nf1+"("+str(year)+").mp4"
print(newname)
Рекомендации по теме
Комментарии
Автор

Hey there! I just found your channel, love what you're doing there! I like how clear and detailed your explanations are as well as the depth of knowledge you have surrounding the topic! Since I run a tech education channel as well, I love to see fellow Content Creators sharing, educating, and inspiring a large global audience. I wish you the best of luck on your YouTube Journey, can't wait to see you succeed! Your content really stands out and you've put so much thought into your videos! Cheers!

AgileDeveloper-vz
Автор

Please Can I have an account for babbel? I need it

paulaboa
Автор

Hi, could you make me a Babbel account please, I need to learn german

aixamonge
join shbcf.ru