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
- Filter First, Think Later February 21, 2026
- Five Hundred Bugs That Fuzzers Missed February 20, 2026
- Gemini 3.1 Pro and the 0.1 That Matters February 19, 2026