Python Forum
Copy paste on a file automatically
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Copy paste on a file automatically
#1
Hello guys, hope you are having a nice week-end.
I have a personal problem, I am not really good at Python, I know few things but enough for these kinds of problems
I actually want to create a program that will copy paste what have just been placed in a file, in another file so that nothing will be lost if the first file I was talking about is deleted.
Solving this problem would help me so much, way better if I understand what you've done !
Reply
#2
Copying the file spam.txt to spam.txt.bak is very easy to do for a python program. Your question implies that the program should cleverly decide when the copy must be done. This part is unclear in your question. Note that every time the program copies the file, the old version of spam.txt.bak is erased, so tell us how the program should know when to make the copy?
Reply
#3
(Jan-18-2020, 04:29 PM)Aure4 Wrote: way better if I understand what you've done !

Lucky for you, no one is likely to write it for you. lol If you try first and post your attempt here, even if it is terrible, people will be more eager to help.

Find yourself some tutorials. I'm a fan of youtube, but if you search "python read write file" anywhere you'll find tons.

Show me what you come up with.

M.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Why is the copy method name in python list copy and not `__copy__`? YouHoGeon 2 252 Apr-04-2024, 01:18 AM
Last Post: YouHoGeon
  Copy Paste excel files based on the first letters of the file name Viento 2 423 Feb-07-2024, 12:24 PM
Last Post: Viento
  What script to paste folders thenewcoder 1 664 Nov-29-2023, 09:40 AM
Last Post: Pedroski55
  Copy data from Excel and paste into Discord (Midjourney) Joe_Wright 4 2,035 Jun-06-2023, 05:49 PM
Last Post: rajeshgk
  is it possible to copy image from email and place into excel file? cubangt 3 1,265 Nov-30-2022, 05:11 PM
Last Post: snippsat
  Please help me [copy and paste file from src to dst] midomarc 2 1,010 Nov-24-2022, 10:13 PM
Last Post: midomarc
  ImageTk Paste KDog 14 6,906 Jun-27-2021, 11:07 AM
Last Post: KDog
  Copy column from one existing excel file to another file mkujawsk 0 5,612 Apr-14-2021, 06:33 PM
Last Post: mkujawsk
  Cut and Paste Oshadha 3 2,433 Jan-20-2021, 04:27 PM
Last Post: spaceraiders
  Failing to copy file from a network to a local drive tester_V 4 7,103 Jan-20-2021, 07:40 AM
Last Post: tester_V

Forum Jump:

User Panel Messages

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