Hi Claudia, Thanks very much for getting back to me, this worked perfectly except that it kept changing \ for \ in the path name. i got around this by doing os.chdir('Y:') os.chdir('dataFiles') Messy, but it worked. thanks again. Ashton
Good eveing, hoping someone can help. I have a few thousand files that all have specific bits of texts that need to be replaced with the file name of that particular file. After a bit of searching, I think Python is the best was to do this but it isn't something i'm very familiar with so am using the nppp python plugin. Essentially, I have a directory (Y:\dataFiles) that contains all of the xml files that need editing, i was hoping to run a script to edit .xml in Y:\dataFiles and replace 'replaceData'...