4cade/bin/padto.js

15 lines
445 B
JavaScript
Raw Normal View History

2019-01-08 02:22:55 +00:00
a = new ActiveXObject("scripting.filesystemobject")
2021-11-18 20:52:11 +00:00
if (WScript.Arguments(1) == "build\\PREFS.CONF")
{
b = a.opentextfile(WScript.Arguments(1))
c = b.readall().replace(/\r\n/g, "\n")
b.close()
b = a.createtextfile(WScript.Arguments(1))
b.write(c)
b.close()
}
c = a.getfile(WScript.Arguments(1)).size
b = a.opentextfile(WScript.Arguments(1), 8).write(Array((Math.floor((c + 511) / 512) * 512) - c + 1).join(String.fromCharCode(0)))