variable looses it's values in a new session 
Author Message
 variable looses it's values in a new session

 Hi everyone,

I am using shell scripting in win2k to copy a file to another directory.
The file changes by one every day.
When I set variable aa to value 15 and then I want to change it to 16
by adding one, it does in a session, but when I close and establish a
new session the variable defaults back to 15.

set /a aa = 15
copy  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
set /a aa = %aa% + 1

echo %aa%

The response is 16 but when you cd and cd back echo %aa% is 15 again.

I have aa set up as an environmental variable for administrator in
system win2k.

Is there any way to make a change to a variable in shell scripting and
have it permanently save/remember it?

I have shell scripting by Tim HIll , but it doesn't seem to address
this.  Atleast I can't find it.  Maybe I should use vb or wsh for this?

Thanks for any help,
Fritz

--
F
Ri
Tz

--
F
Ri
Tz

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 18 May 2003 03:00:00 GMT  
 variable looses it's values in a new session
hi Fritz,

This is what the registry is for...

Or, why don't you just use the day's date as a key (hint: the date increases
by one every day)...

cheers, jw


Quote:
> Hi everyone,

> I am using shell scripting in win2k to copy a file to another directory.
> The file changes by one every day.
> When I set variable aa to value 15 and then I want to change it to 16
> by adding one, it does in a session, but when I close and establish a
> new session the variable defaults back to 15.

> set /a aa = 15
> copy  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> set /a aa = %aa% + 1

> echo %aa%

> The response is 16 but when you cd and cd back echo %aa% is 15 again.

> I have aa set up as an environmental variable for administrator in
> system win2k.

> Is there any way to make a change to a variable in shell scripting and
> have it permanently save/remember it?

> I have shell scripting by Tim HIll , but it doesn't seem to address
> this.  Atleast I can't find it.  Maybe I should use vb or wsh for this?

> Thanks for any help,
> Fritz

> --
> F
> Ri
> Tz

> --
> F
> Ri
> Tz

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Mon, 19 May 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Session Variables and the 'Back' button

2. Passing Session Variable to a new windows

3. Session variables losing scope for new window

4. Problem with SESSION VARIABLES using netscape when opening a new instance of the browser

5. How to pass the value of a variable to Session object

6. change value of session variable in client side script

7. Changing values of session variables in client side script

8. Is it possible to assign a form value to a Session variable in Javascript

9. ASP Session Variable value in frames

10. Passing a ASP Session Variable Value into a JavaScript function

11. What's so special with Session variables?

12. What's so special with Session variables?

 

 
Powered by phpBB® Forum Software