2
I'm having lots of issues with this script. It's supposed to read the a file (that the user specifies) then save it to the storeresult
environment variable.
I'm using a BAT To EXE converter that doesn't affect any batch commands, so it's not that. (Just if you're wondering why i'm calling storvar
instead of storvar.bat
)
The main script (storvar.exe
):
set a=%~1
set b=%~2
set c=%~3
for /f "delims=" %%a in (stor\%a%.stor) do set storeresult=%%a
pause
The script i'm using to call the script (No errors with calling):
storevar Hi hi
pause
echo %storeresult%
pause
When I call it, it just returns the result (%storeresult%
) as nothing, I cant find the issue!
What is in
stor\Hi.stor
? Where are you writing this file? Please show all your code if you expect an answer. – DavidPostill – 2018-06-10T05:49:10.123Did it work before you used the bat to exe converter? – Mokubai – 2018-06-10T05:56:17.440
No, Fleet Commands answer helped me. – ZeekPlayz – 2018-06-10T18:04:20.243
First of all, welcome to Super User! As you get settled into the community, it might be prudent to devote a few minutes towards reading the Help section tutorials. For example, if it is true that Fleet Command's answer helped you, the following is probably applicable: What does it mean when an answer is "accepted"?
– Run5k – 2018-06-16T16:14:29.890