About 82 results
Open links in new tab
  1. python - How do I copy a file? - Stack Overflow

    How do I copy a file in Python? copy2(src,dst) is often more useful than copyfile(src,dst) because: it allows dst to be a directory (instead of the complete target filename), in which case the basename of …

  2. Copy a file from one location to another in Python

    Copy a file from one location to another in Python Asked 7 years, 4 months ago Modified 3 years, 9 months ago Viewed 117k times

  3. Copy multiple files in Python - Stack Overflow

    Nov 27, 2018 · How to copy all the files present in one directory to another directory using Python. I have the source path and the destination path as string.

  4. Copy file with pathlib in Python - Stack Overflow

    Nov 10, 2015 · This copies the file's contents, but not file permissions, ownership, access policies, or other file metadata. OP's comment actually says that s/he wants to "copy the file," not just the data it …

  5. Python copy files to a new directory and rename if file name already ...

    I'm using python to iterate through a directory (lets call it move directory) to copy mainly pdf files (matching a unique ID) to another directory (base directory) to the matching folder (with the …

  6. python - How to Copy Files Fast - Stack Overflow

    Oct 26, 2024 · 31 What is the fastest way to copy files in a python program? It takes at least 3 times longer to copy files with shutil.copyfile() versus to a regular right-click-copy > right-click-paste using …

  7. python - Copy file if it doesn't already exist - Stack Overflow

    Dec 16, 2013 · I'm fairly new to python, and I'm wondering how I can copy and paste a file from one location to another with first checking to see if the copied file exists in the destination folder? The …

  8. python copy files by wildcards - Stack Overflow

    Aug 22, 2013 · I am learning python (python 3) and I can copy 1 file to a new directory by doing this

  9. python - Keeping file attributes on a copy - Stack Overflow

    Mar 4, 2017 · Identical to copy() except that copy2() also attempts to preserve all file metadata. In recent versions of Python, there's a whole slew of functions to do bits and pieces of this separately— copy, …

  10. How to copy a file in Python? - Stack Overflow

    Mar 5, 2013 · What copy does is that it shallow copies the objects in python, has nothing to do with copying files. What this line actually does is that it copies input file contents over the name of the …