B
Bob Then
how can i change all files from one extension to another within a direcory?
Bob said:how can i change all files from one extension to another within a direcory?
direcory?Bob said:how can i change all files from one extension to another within a
Bob said:how can i change all files from one extension to another within a direcory?
That approach works, but so does this one.
import os, glob
input_file_list = glob.glob('*.txt')
for in_file in input_file_list:
name = in_file.split('.')
os.rename(in_file, str(name[0]) + '.' + 'text'))
Bob Then said:how can i change all files from one extension to another within a direcory?
Tim said:In Windows, the quickest way is:
os.system( "rename *.old *.new" )
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.