I've beem browsing through some older questions and looking for a way to rename files that load into a folder.
So far I've got a folder which gets loaded with files some times per day a few files.
First of all I want to move all these files from lets say 'C:\Folder' to 'F:\Folder1'.
After I've moved the files I want to rename them using a python script. So far I've been looking at something like the below.
import os, sys
print "Current directory is: %s" %os.getcwd()
# listing directories
print "The dir is: %s"%os.listdir(os.getcwd())
# renaming file "aa1.txt"
os.renames("aa1.txt","newdir/aanew.txt")
print "Successfully renamed."
But I want to loop it so that all files get their names changed. Example MyFile1.csv if there are more MyFile2, MyFile3 etc
Thanks!