For mod users: Until adequate safety measures are included in this code, I DO NOT RECOMMEND YOU USE THIS MOD. There is a fully non-destructive alternative here (using symlinks and disabling/enabling files INSTEAD OF JUST STRAIGHT UP DELETING THEM, BECAUSE WHY WOULD YOU) which I personally use and strongly recommend.
---
To the mod author: I strongly recommend refactoring your code to
1. include error logging -- robocopy already easily has this functionality, I don't know why you didn't use it in draft 1 2. return out on error throw instead of proceeding through it -- as above, return/exit codes already exist natively to robocopy and a simple if statement can be used to tell your batch file to stop instead of continuing past/through an error. 3. before deleting (or ideally before copying, even) confirm that the given filepath actually exists before executing 4. NOT including a "viable" filepath by default in your bat that you're giving out to people
just to save people some heartache who might make a typo, or not realize they didn't Ctrl+S before running the bat file, or who accidentally do double click your bat file instead of opening it to edit first.
Cautious engineering, especially when dealing with deleting files wholesale, should be the default. Just using red text and warnings and washing your hands of it because "well, the user should have been more careful, it's not my fault" is not good enough.
Hi there, thanks for the feedback. While I wholeheartedly agree with your statements for regular software, this was just a tool I wrote as a convenience for myself in about two hours, I wasn't even sure anybody else would have a real use case for it, but decided to share it if anybody cared, I have no plans to maintain this as it completly does what I need it to.
But the tool you linked is a very nice find indeed. I didn't even know it existed. Does everything and better... could have saved my time. I will link to it on the description page and state that my tool is deprecated.
Hello! I used the script and it only reverted Mods folder to vanilla but the game's bin and Data folders are still modded Did I do anything wrong?
EDIT: So this mod removed all 200 .pak from my Mods folder. Not even back it up or give me an error or warning beforehand, just straight up deleted them.. 2 months worth of things are gone now. Do not recommend this whatsoever. At least place the mods in Recycle Bin or something, don't just straight up freaking delete it man..
Normally they should be backed up first time you run the script? Did you set the Backup folder like it says in the description? And really sorry for your inconvenience.
Author was kind enough to send me the files via DM, and it works perfectly. The .bat is clearly commented and easy to edit for additional needs. I hope it clears quarantine soon.
I just tested it and it works, this is going to make playing alone and with my friend in multiplayer so much easier, me and my over 150+ mods thank you <3
Hi everybody, nice to see that people seem to want this. Sorry for the inconvenience. I requested a review for the quarantine, hope you will get access soon.
They anti-virus protection saw a .Bat and lost its mind lol! Ill track and download once its back up and running, thanks for this. its much easier edit this a bit and just use it to switch between my setup and my gfs setup :3
22 comments
There is a fully non-destructive alternative here (using symlinks and disabling/enabling files INSTEAD OF JUST STRAIGHT UP DELETING THEM, BECAUSE WHY WOULD YOU) which I personally use and strongly recommend.
---
To the mod author: I strongly recommend refactoring your code to
1. include error logging -- robocopy already easily has this functionality, I don't know why you didn't use it in draft 1
2. return out on error throw instead of proceeding through it -- as above, return/exit codes already exist natively to robocopy and a simple if statement can be used to tell your batch file to stop instead of continuing past/through an error.
3. before deleting (or ideally before copying, even) confirm that the given filepath actually exists before executing
4. NOT including a "viable" filepath by default in your bat that you're giving out to people
just to save people some heartache who might make a typo, or not realize they didn't Ctrl+S before running the bat file, or who accidentally do double click your bat file instead of opening it to edit first.
Cautious engineering, especially when dealing with deleting files wholesale, should be the default. Just using red text and warnings and washing your hands of it because "well, the user should have been more careful, it's not my fault" is not good enough.
thanks for the feedback.
While I wholeheartedly agree with your statements for regular software, this was just a tool I wrote as a convenience for myself in about two hours, I wasn't even sure anybody else would have a real use case for it, but decided to share it if anybody cared, I have no plans to maintain this as it completly does what I need it to.
But the tool you linked is a very nice find indeed. I didn't even know it existed. Does everything and better... could have saved my time. I will link to it on the description page and state that my tool is deprecated.
Did I do anything wrong?
EDIT: So this mod removed all 200 .pak from my Mods folder. Not even back it up or give me an error or warning beforehand, just straight up deleted them.. 2 months worth of things are gone now. Do not recommend this whatsoever. At least place the mods in Recycle Bin or something, don't just straight up freaking delete it man..
And really sorry for your inconvenience.
Thanks to all the people that dm'ed me and wanted to test the file even if it was not approved yet
The .bat is clearly commented and easy to edit for additional needs. I hope it clears quarantine soon.
Thank you for sharing, saitenspiele!
Nvm the mods in my data folder where not in a extra /mods folder mb
If anyone else wants a direct link, just message me
nice to see that people seem to want this. Sorry for the inconvenience. I requested a review for the quarantine, hope you will get access soon.