Cache - *.BAT

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
alexandredneto
Posts: 39
Joined: 28 Feb 2013 13:40

Cache - *.BAT

#1 Post by alexandredneto » 03 Jun 2014 12:07

Hello, everyone.

There is a cache (storage) on Windows files (bat) memory that were executed?

Thank you.

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: Cache - *.BAT

#2 Post by Squashman » 03 Jun 2014 13:30

Could you explain your problem with a little more detail or give an example of what you are referring to.

alexandredneto
Posts: 39
Joined: 28 Feb 2013 13:40

Re: Cache - *.BAT

#3 Post by alexandredneto » 06 Jun 2014 07:01

This occurred a few times.
And it's kind of confusing.

When I make a functional version of the code (no errors) in c:\Programs\A.
And develop another version of the code.
I suddenly realize that the development is not going well, there are errors.

And go back to develop the previous version (which worked). Surprisingly, sometimes the execution shows the same flaws. It makes me think that there is a cache of the code that is allocated to the operating system.
Strange, because the file names are different.

Has anyone experienced this. Sometimes when I change directory failures of previous version of code stop occurs.

This occurred in about 5 servers.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Cache - *.BAT

#4 Post by foxidrive » 06 Jun 2014 09:37

99 times out of 100 when something unexpected happens you will find that there is a flaw in the code.
Your description is vague and without code it's pretty hard to help you.

From the MSDOS days up until the present: when you launch a batch file the OS opens the batch file and reads a line, closes the file and executes the line, reopens the file and from the saved pointer it will read the next line and execute that, and repeat. It may read more code if there is a block in parentheses - and the guys here will chime in to give you better details.

There is a disk cache in Windows but you can prove the above behaviour by editing a running batch file that is in a classic loop, and you will get errors or unexpected behaviour. It's not running from the cache.

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: Cache - *.BAT

#5 Post by Squashman » 06 Jun 2014 10:05

If I had a dime for every time I had a batch file in two different directories and was editing one and running the other I would be a rich man.

Post Reply