Skip to main content

3 functions to copy faster

Project description

Three functions to copy/move files faster with Python:

Based on this answer: https://stackoverflow.com/a/28129677/15096247

copyfile(src: str, dst: str, copystat: bool = True) -> bool



movefile(src: str, dst: str, copystat: bool = True) -> bool



copytree(  

src: str, dst: str, ignore: Union[list, type(None)] = None, symlinks: bool = False  

)
from fastfilecopy import copyfile,movefile,copytree



copyfile(r"F:\2020-12-02 15-35-25.mp4", r'c:\videoxxxxxxxxxxxx.mp4')

Out[3]: True



copyfile(r"F:\2020-12-02 15-35-25.mp4", r'c:\videoxxxxxxxxxxxx.mp4', copystat=False)

Out[4]: True



copyfile(r"F:\2020-12-02 15-35-25.mp4", r'c:\videoxxxxxxxxxxx2x.mp4', copystat=False)

Out[5]: True



movefile(r"C:\videoxxxxxxxxxxxx.mp4",r'c:\videoxxxxxxxxxxxxaaaaaa.mp4' , copystat=False)

Out[7]: True



movefile(r"c:\videoxxxxxxxxxxxxaaaaaa.mp4",r'c:\videoxxaavvvvbbbxxxxxxxxxxaaaaaa.mp4' , copystat=True)

Out[8]: True



copytree(r"F:\GUTENBERGNEU2", 'c:\\testcopytree', ignore=None,symlinks=False)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

FastCopyFast-0.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

FastCopyFast-0.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file FastCopyFast-0.2.tar.gz.

File metadata

  • Download URL: FastCopyFast-0.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for FastCopyFast-0.2.tar.gz
Algorithm Hash digest
SHA256 b993825568068f0cfce246c783a19ee4e42915bf0d96a23cf4955a8934bea238
MD5 fa7089f58c4bdb8ac9a17c0b48593297
BLAKE2b-256 f323dfc4048275deb0074f7643f787cf1a818f01c4e797a928feede6576616e2

See more details on using hashes here.

Provenance

File details

Details for the file FastCopyFast-0.2-py3-none-any.whl.

File metadata

  • Download URL: FastCopyFast-0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for FastCopyFast-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f66f2821fc252261c3064bc5d5aa56d27f99569feb6694b25cce180972bd746a
MD5 f4b250909c203938dc9b4be01f236dc0
BLAKE2b-256 0bd89c898f351d0f0b5ba4a38f65db74876421c1e8d3cc26cfe36b73801cd8b8

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page