About 64 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 …

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

    Copy a file from one location to another in Python Asked 7 years, 3 months ago Modified 3 years, 8 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. python - How to Copy Files Fast - Stack Overflow

    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 …

  5. shutil - How do I copy an entire directory of files into an existing ...

    How do I copy an entire directory of files into an existing directory using Python? Asked 16 years, 2 months ago Modified 10 months ago Viewed 632k times

  6. Python copy files to a new directory and rename if file name …

    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 …

  7. Copy file with pathlib in Python - Stack Overflow

    Nov 10, 2015 · The file will be loaded in memory, so this method is not suitable for files larger than the machines available memory. As per the comments, one can use write_bytes and …

  8. Copy file or directories recursively in Python - Stack Overflow

    164 Python seems to have functions for copying files (e.g. shutil.copy) and functions for copying directories (e.g. shutil.copytree) but I haven't found any function that handles both. Sure, it's …

  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 …

  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 …