I am trying to perform a simple task of copying files under Windows and I am having some problems.
My first attempt was to use
import shutils source = 'C:\Documents and Settings\Some directory\My file.txt' destination = 'C:\Documents and Settings\Some other directory\Copy.txt' shutil.copyfile(source, destination)
copyfile cannot find the source and / or cannot create the destination.
My second assumption was to use
shutil.copyfile('"' + source + '"', '"' + destination + '"')
But it does not work again.
Any clues?
Edit
Received code
IOError: [Errno 22] Invalid argument: '"C:\Documents and Settings\Some directory\My file.txt"'
source share