4cade/bin/flatten.js

14 lines
488 B
JavaScript
Raw Normal View History

2024-05-27 05:52:10 +00:00
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)
}