4sports/bin/padto.js

15 lines
445 B
JavaScript
Raw Normal View History

2021-02-16 06:01:22 +00:00
a = new ActiveXObject("scripting.filesystemobject")
2022-08-23 02:04:55 +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)))