4cade/bin/flatten.js
Peter Ferrie bbe441a983 sync
2024-05-26 22:52:10 -07:00

14 lines
488 B
JavaScript

a = new ActiveXObject("scripting.filesystemobject")
x = new ActiveXObject("wscript.shell")
for (b = new Enumerator(a.GetFolder("build\\X").subfolders); !b.atEnd(); b.moveNext())
{
for (c = new Enumerator(b.item().subfolders); !c.atEnd(); c.moveNext())
{
x.run('cmd /c move build\\X\\' + b.item().name + '\\' + c.item().name + ' build\\X', 0, 1)
}
x.run('cmd /c move build\\X\\' + b.item().name + '\\* build\\X', 0, 1)
x.run('cmd /c rd build\\X\\' + b.item().name, 0, 1)
}