#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    1
    Rep Power
    0

    Python modifying files scripts


    Hello all,

    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
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Location
    /dev/null
    Posts
    163
    Rep Power
    19
    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.

IMN logo majestic logo threadwatch logo seochat tools logo