Howto: fix broken funscripts with stash/stashapp

The problem was stated here:
https://discuss.eroscripts.com/t/stash-and-broken-scripts/146900

And a manual solution given (invalid value for range, change it from 90 to 100):

Here’s a script to do it en masse to an entire folder:

find $FOLDER -type f -name '*.funscript' -exec perl -pi -e 's/"range":\s*90/"range":100/s' {} \;

where $FOLDER could be replaced with “.” or set explicitly, e.g.

export FOLDER=/some/path

Would you be willing to give a bit more instruction on how to use this? Using PS with either “.” or manually pointing to the folder with the script always gives a “FIND: Parameter format not correct” error

Thanks so much for making and posting this fix too, it’s been driving me nuts!

not quite sure about the use of the command, but if you have notepad++ you can use its Find and replace function to do it en masse in files
image

This worked perfectly, thanks so much!

i will add to this, that Find term only fixes stuff thats set to range 90
if you need to fix everything(ish) in 1 go then: \“range\”: {0,1}[2-9][0-9]
this will fix everything in range 20-99