protected Script createAddScript(Path resourcefile, List<ResourceVO> resources, Path resHackerLog) {
        assert (resourcefile != null) && (resHackerLog != null);
        assert (resources != null) && !resources.isEmpty();

        List<String> sb = new LinkedList<>();
        Iterator<ResourceVO> i = resources.listIterator(0);

        sb.add(this.RES_SCRIPTHEADER1 + resourcefile + this.newLine);
        sb.add(this.RES_SCRIPTHEADER2 + resourcefile + this.newLine);
        sb.add(this.RES_SCRIPTHEADER3 + resHackerLog + this.newLine + this.newLine);
        sb.add(this.RES_SCRIPTHEADER4);

        while (i.hasNext()) {
            ResourceVO tmp = i.next();
            sb.add(this.CMD_ADDOVERWRITE + tmp.getPath() + ", " + tmp.getType() + ", " + tmp.getResourceNumber() + "," + this.newLine);
        }

        if (!FileUtil.writeTextFile(this.scriptPath, sb, false)) {
            return null;
        }

        assert FileUtil.control(this.scriptPath);
        return new Script(this.scriptPath);
    }