def copy_files_to_folder(files, target_folder, overwrite=True):
if not files:<EOL><INDENT>return []<EOL><DEDENT>for f in files:<EOL><INDENT>target = os.path.join(target_folder, os.path.split(f)[-<NUM_LIT:1>])<EOL>if target == f:<EOL><INDENT>return target<EOL><DEDENT>if os.path.exists(target):<EOL><INDENT>if overwrite:<EOL><INDENT>try:<EOL><INDENT>os.remove(target)<EOL><DEDENT>except Exception:<EOL><INDENT>raise IOError("<STR_LIT>" % f)<EOL><DEDENT>else:<EOL><INDENT>shutil.copy(f, target)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>continue<EOL><DEDENT><DEDENT>else:<EOL><INDENT>print('<STR_LIT>' % (os.path.split(f)[-<NUM_LIT:1>],<EOL>os.path.normpath(target_folder)))<EOL>shutil.copy(f, target)<EOL><DEDENT><DEDENT>return [os.path.join(target_folder, os.path.split(f)[-<NUM_LIT:1>]) for f in files]<EOL>
Copy a list of files to a new target folder.

    Returns:
        A list of fullpath of the new files.