Copying Again
April 19, 2018
A simple script that just checks the file size and copies the file to a target destination that you specify. That's done when you pass in script, file_from, file_to = argv
at the very beginning.
from sys import argv
script, file_from, file_to = argv
file_in = open(file_from)
indata = file_in.read()
print "The file called '%s'is %r bytes in length" % (file_from, len(indata))
file_out = open(file_to, 'w')
file_out.write(indata)
file_in.close()
file_out.close()
Recent Entries
- Data-Driven Enhancements February 08, 2025
- Building a Dynamic Prompting App February 06, 2025
- Sphaîra February 05, 2025