4cade/bin/addfile.js

6 lines
636 B
JavaScript
Raw Normal View History

2021-11-13 06:07:42 +00:00
a=new ActiveXObject("scripting.filesystemobject")
2021-11-18 20:52:11 +00:00
offset=a.getfile("BUILD\\TOTAL.DATA").size
new ActiveXObject("wscript.shell").run('cmd /c copy /b /y BUILD\\TOTAL.DATA + ' + WScript.Arguments(0) + ' BUILD\\TOTAL.DATA', 0, 1)
2021-11-13 06:07:42 +00:00
size=a.getfile(WScript.Arguments(0)).size
2024-06-20 21:59:59 +00:00
a.createtextfile(WScript.Arguments(1)).write(";\r\n; Index record for " + WScript.Arguments(0).replace(/\\/, "/") + "\r\n;\r\n; This file is automatically generated\r\n;\r\n !byte 0\r\n !be24 " + " ".substr(0, 9 - offset.toString().length) + offset + "\r\n !le16 " + " ".substr(0, 8 - size.toString().length) + size + "\r\n")