atrcopy/atrcopy.py
Rob McMullen f217f17dab Added command line arguments to atrdump
* added execute persmissions
2015-05-09 10:01:59 -07:00

18 lines
402 B
Python
Executable File

#!/usr/bin/env python
from atrutil import *
if __name__ == "__main__":
import sys
image = sys.argv[1]
print image
with open(image, "rb") as fh:
atr = AtrDiskImage(fh)
print atr
for filename in sys.argv[2:]:
print filename
bytes = atr.find_file(filename)
with open(filename, "wb") as fh:
fh.write(bytes)