Question : rename files
Answered by : zany-zebra-32zp9f8kel9c
import os
#replace 'b4lib with the relative path of the folder
for filename in os.listdir('b4lib'): # print(filename) #replace 'full_path' with the full path of the directory with your file f = os.path.join('full_path',filename) print(f) # rename the file. The below code removes '-Copy1' from the filename os.rename(f, f.replace('-Copy1', ''))
Source : | Last Update : Wed, 11 May 22
Question : Rename File with the rename Command
Answered by : annoyed-alligator-lsqba2u6g5kj
mv someFileName myNewNameFile
Source : | Last Update : Tue, 28 Jun 22