hi ,
i dont find a command os.xxx for copy a file.
any solution exist for this ?
ex same command like : cp file1 file2
thx !!!
Copy files
Re: Copy files
OK great i found the lib shutil .. awesome for mae a copy file
Re: Copy files
Got it to work by first opening both files:
Code: Select all
fileA = open('/ramdisk/datalog.csv', 'rb')
fileB = open('/datalog.csv', 'wb')
copyfileobj(fileA, fileB)
Last edited by davef on Fri Apr 30, 2021 10:12 am, edited 1 time in total.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Copy files
Just beat me to it. When I first tried it I didn't use fileA/fileB but the filenames