June 23rd, 2013, 10:10 AM
Python modifying files scripts
Basically, I want code a python script that looks inside a folder that contains an xml template file and a base image, duplicates both files in to a new folder and changes its file names and certain parameters (in the xml file) and then sends a command.
How will I be able to achieve this?
Thanks in advance
June 23rd, 2013, 07:25 PM
1. Traverse through the contents of a directory using os.listdir() or os.walk()
2. Copy file to a new destination using shutil.copy()
Give it a try and let us know where you're stuck.