Skip to main content
Stack Overflow
  1. About
  2. For Teams

Timeline for How do I copy a file?

Current License: CC BY-SA 3.0

9 events
when toggle format what by license comment
Mar 11, 2025 at 23:27 comment added MikeKulls @YaroslavNikitenko that's why he gave multiple options. If he gave that as a single option then your reply would be valid.
Jun 5, 2024 at 13:11 comment added Narges Ghanbari what is different between using shutil and os modules ? do they work in the same way?
Apr 25, 2024 at 7:51 comment added SomethingSomething You technically can copy using a shell command, but why? Is there any case where shutil's provided API is not safer, more robust and covering all the edge cases in a single API, apart from being cross-platform? I'd at least mention near those examples a comment about them not being recommended.
Nov 17, 2022 at 16:50 comment added Shriraj Hegde Only the first example answers the question. Running shell commands isn't portable and also isn't really performing actions.
Sep 10, 2022 at 15:28 comment added Yaroslav Nikitenko Thanks for many options you listed. IMHO, "os.popen('cp source.txt destination.txt') " (with its likes) is bad design. Python is a platform-independent language, and with code like this you destroy this great feature.
Jun 20, 2020 at 9:12 history edited Community Bot
Commonmark migration
Apr 29, 2019 at 18:11 history undeleted Jean-François Fabre
Apr 29, 2019 at 17:23 history deleted Jean-François Fabre via Vote
Jan 22, 2018 at 3:05 history answered kmario23 CC BY-SA 3.0

AltStyle によって変換されたページ (->オリジナル) /