Three functions to copy/move files faster with Python:
Project description
Three functions to copy/move files faster with Python:
Based on this answer: https://stackoverflow.com/a/28129677/15096247
pip install FastCopyFast
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 FastCopyFast 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.5.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for FastCopyFast-0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e454c41d47c2b7248ffc31a1d844d64d8297c1bcc6dcb2f946ee3ce5927b885 |
|
MD5 | e63a9d983fdd12e43030e9468555614f |
|
BLAKE2b-256 | aac6df9b0caea34fd0335a458981bb8067c4c6cb9c306b6e8f1a42353aeeb0f9 |