Python Forum
How do I copy files faster with python?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I copy files faster with python?
#8
I personally prefer avoid copying files whenever possible (except backup Smile).

If it's not some sort of backup solution then just an idea: one can use os.walk() to hardlink destination to same file in source. If file in source is changed the hardlink should hold (keeps same inode number on *nix and the file index on Windows). If file renaming occur then based on os.stat() attribute st_ino one should be able to update the filename. os.stat() should be cheaper than actual copying of files.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Messages In This Thread
RE: How do I copy files faster with python? - by perfringo - Jul-19-2019, 11:47 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to download large files faster? kucingkembar 3 869 Feb-20-2025, 06:57 PM
Last Post: snippsat
  What is a faster way to deep copy a nested list without using .deepcopy()? Shervin_Ataeian 1 1,480 Oct-13-2024, 01:28 PM
Last Post: Pedroski55
  Copy and Paste Files - Command MicheliBarcello 2 902 Jun-25-2024, 05:04 AM
Last Post: rodiongork
  Why is the copy method name in python list copy and not `__copy__`? YouHoGeon 2 1,359 Apr-04-2024, 01:18 AM
Last Post: YouHoGeon
  Copy Paste excel files based on the first letters of the file name Viento 2 1,590 Feb-07-2024, 12:24 PM
Last Post: Viento
  Create new folders and copy files cocobolli 3 4,477 Mar-22-2023, 10:23 AM
Last Post: Gribouillis
  Copy only hidden files and folders with rsync Cannondale 2 2,309 Mar-04-2023, 02:48 PM
Last Post: Cannondale
  Compare filename with folder name and copy matching files into a particular folder shantanu97 2 6,354 Dec-18-2021, 09:32 PM
Last Post: Larz60+
  Copy documents to Teams using python SallySmith 0 3,112 Mar-23-2021, 04:27 AM
Last Post: SallySmith
  Copy files from subfolders into same name of subfolders at other directory rathoreanil 1 3,065 Oct-12-2020, 01:30 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020