1.

Solve : I need help loading?

Answer»

I can save perfectly but I can't load and have the variables CHANGE with it any help I will try.
My code looks like this:
echo off
Setlocal enabledelayedexpasion
Set var1=3
Set var2=7
Set var3=4
Set var4=4
Set var1_wieght=6
Set var1_value=4
Stuff like that
I am writing this on a tablet because my computer has an internet issue
But my computer is an windowns xp and is an hp computer.
Thanks
Batch code:

echo off
set val1=32
set val2=54
set val3=69

echo these are values we will save:
echo val1=%val1%
echo val2=%val2%
echo val3=%val3%

if exist values.dat del values.dat
echo val1=%val1% >> values.dat
echo val2=%val2% >> values.dat
echo val3=%val3% >> values.dat

echo reset values:
set val1=0
set val2=0
set val3=0
echo val1=%val1%
echo val2=%val2%
echo val3=%val3%

echo load values:
for /f "delims=" %%A in (values.dat) do set %%A
echo val1=%val1%
echo val2=%val2%
echo val3=%val3%

Batch output:

these are values we will save:
val1=32
val2=54
val3=69
reset values:
val1=0
val2=0
val3=0
load values:
val1=32
val2=54
val3=69Thanks
 But sadly that for some unknown reason won't work i t just shuts down
Quote from: shiverbob on June 30, 2014, 02:48:22 PM

i t just shuts down

What, the PC shuts down?
Connect your tablet to the computer, and post the whole code.  It is most likely be a directory discrepancy. Quote from: shiverbob on June 30, 2014, 02:48:22 PM
Thanks
 But sadly that for some unknown reason won't work i t just shuts down

Put a pause command as the last line.When I conect to thhe computer it wants me to install mpt and my tablet is a nook
 How are you running a batch file on a nook?  It uses android.  I'll work on a adb solution.  Where is your file saved on the nook?

something like this:
Code: [Select]adb pull "%loc%" "%cd%\BatchFile.bat"
I am not running the file through a nook I can but I USE a windows xp.
It is a hp tower
I don't know if that helps
So if you are not running the batch file on the nook, but when you run it it doesn't work, and you cannot transfer it off the nook, what is it doing on the nook to begin with?

If the file is actually on the hp tower and not the nook, then can't you move it over via flash drive to the computer you are posting from and then post the code?No the tower doesn't have internet this does and the file was never on the nook
If it helps it is and hp tower with operating system of window xp home edition
And I have no other computer that works right now I am in the middle of building one
I am posting from the nook
I tried the code and it says envirment VARIBLE not set?
You aren't overriding %path% are you?  If not, check to make sure that C:\windows\system32 is somewhere in that.  It should be easy to do with
Code: [Select]echo %path% | find "system32"
if something shows up, you have it in there.I just TOOK away echo off and it says what it is supposed to say
This weekend I will try UPDATING it to vista and see if that helps
It is all saved to my desktop and I have know idea why its not working.
It work on my friends computer and his was a  windows 7
I will upload the code tomorrow I am going to be out of town


Discussion

No Comment Found