So I'm trying to make a command that will update all files in "scripts/". /updateplugin doesn't work for all files in "scripts/", pretty sure its because not all the files in "/scripts/ are plugins, they are command files as well. And /updatecommands doesn't update them from the web, so I can't use that. So the code I have so far is: Code (text): if (command == "updatescriptfiles") { var scriptFiles = ["admincommands.js", "auto_smute.js", "battlefactory.js", "blackjack.js", "bot.js", "casino.js", "channelcommands.js", "channelfunctions.js", "channelmanager.js", "commands.js", "crc32.js", "globalfunctions.js", "hangman.js", "kirby.js", "mafia.js", "mafiachecker.js", "mafiastats.js", "memoryhash.js", "modcommands.js", "newtourstats.js", "ownercommands.js", "pokedex.js", "pokerace.js", "suspectvoting.js", "tierchecks.js", "tournaments.js", "tours.js", "tourstats.js", "trivia.js", "usercommands.js", "userfunctions.js", "utilities.js", "wallet.js"]; scriptFiles.forEach(function(file) { var updateURL = Config.base_url+scriptFiles; var changescriptFile = function(resp) { if (resp === "") return; try { sys.writeToFile(scriptFiles, resp); } catch (err) { normalbot.sendAll('Updating failed, loaded old scripts!', staffchannel); sys.sendMessage(src, "ERROR: " + err + (err.lineNumber ? " on line: " + err.lineNumber : ""), channel_local); print(err); } }; normalbot.sendMessage(src, "Fetching scripts from " + updateURL, channel); sys.webCall(updateURL, changescriptFile); return; }); } The issue this the command is that instead of update each script one after the other, I try's to do it at the same time. Which means that updateURL is Config.Base_URL+all the scriptFiles. Is there a way I can make it select one of the scriptFiles, than the next one, and so on?