Sure.. except I haven't written a batch script in years. Perl runs on both my windoze box and FreeBSD boxes.. no need to worry about whether I need .BAT or .SH files
Can you copy / paste the few lines above the error line too please? I think I've got a car name wrong in the lookup table, which will also explain Sven's bug report.
Worked great for nearly all my setups, except about 125 of them...they got transferred over but no three digit vehicle name was given so the files just say "_as1_blah345.set" for example.
Thanks ND.. that definitely confirms a car code error. I don't suppose you happen to know what car it was originally meant for do you? This'd really help me pinpoint the error.
Well I can tell you the ones it did work for.
FO8
FOX
FXO
FXR
FZ5
FZR
LX4
LX6
MRT
RAC
RB4
UF1
UFR
XFG
XFR
XRR
XRT
And I believe I did not have any setups for the Sauber to begin with.
So that leaves the new BMW...hmm...seems all were acccounted for but for some reason some setups just didn't transfer.
Nevermind...XRG is missing. Maybe thats the one with the trouble then.
Renaming I:/1_Games/LFS/data/settings/XR GTR_bl1r_bioha1451.set as I:/_Games/LFS/data/setups/XR GTR_bl1r_bioha1451.set...done! Use of uninitialized value in substitution (s///) at I:\x10_to_x30_setup_fix.exe line 69.
hmm actually looking at it makes me think it has an issue with the 1_Games as main folder. OK, altered it, my sets got changed .
Thanks. My BMW Sauber ones renamed no problem.. that said, AFAIK, all cars have a '_race_s.set' setup file.. all of which appear to have been copied ok for me.
FBMW should be unaffected, as X10 didn't have any FBMW setups (I haven't accounted for this car at all).
It is definitely the 'XRG' letters that didn't transfer for me. I finally recongized one of my own setups. Not a big deal for just one car to rename ;-) I can do that manually in a few minutes. Thanks for this script, made it lots easier!
That's even more strange as I definitely detect it correctly as 'XRGT' (or 'XR GT' before I strip the spaces).
I've added checking for this now and fixed the above bug that AP has pointed out to me.
At least now there should be no actual _problems_ when running it.. but still not entirely sure why the XRG fails
If you have a backup of your settings dir ND, could you perhaps restore that and try the updated version I've uploaded to post #1 and let me know if for some reason, this update has fixed that issue too? If so and it still errors, it'll display: 'ERROR: COULD NOT GET CAR CODE FOR $carName' and skip that file.
Did you open a DOS prompt and then type the command? or did you just double-click the binary? I suspect the latter as it contains no code to close the console.. if so, this won't work, it's not a GUI app and requires keyboard input.
I redownloaded the entire Inferno setups to try again. Worked perfect this time. Nice work, certainly beats all three of the renaming applications I downloaded to try out.
Could the XRG problem be releated to the fact that the XRG files are named 'XR GT' and the XRT 'XR GT Turbo?' It might be getting confused somewhere in there; maybe the XRT string is being applied to the 'XR GT' files too?