How to keep a text file always in RAM for faster access?
My text file is shared across our LAN and must stay on the same place as it is now. I can't have it on another disk or location.
If you are trying to access it from other programs or from a text editor you can use ramdisk, which is free* software that allows you to create a virtual disk in your ram while your computer is booted. This is the most economic and easiest solution. It creates something like a partition in your computer's physical memory that you can then write to like a HDD or FlashDrive but with crazy fast read and write speeds.
If you want the file to appear to be a part of the drive that it is currently on you can make a ramdisk, and then using "Create and format hard disk partitions" (or disk part if you are comfortable with command line software) you can mount the ramdisk as an NTFS folder. Just replace the current folder that the text file is in with the new "fake" folder that is actually the ramdisk. This way all other computers won't even know that anything out of the ordinary is going on, but you will get your fast read and write speeds.
Here are some screen shots of mounting the drive as a folder.
Firstly: Open "Create and Format Hard Disk Partitions" find your ramdisk, right click on the volume and click on "Change Drive Letter and Path" below is a screen shot of what you should get after doing that.
Then, enter the path you would like the ramdisk to be mounted as and click ok. You can either leave the existing drive letter that windows assigned originally, or remove it all together.
Lastly: Here is what you should get once you entered the pathname and removed the drive letter:
And now you should be able to access that "folder" as you would any other part of your normal filesystem.
*ramdisk is free for disk sizes up to 4GB, wich is more than any text file I've ever seen before!
When you open the text file in a text editor or word processor, it's in RAM. It'll stay in RAM (or your pagefile) until you close it.
Betting you probably want the copy in RAM on your computer to automatically update when someone on the LAN changes the file. You need a text editor or word processor that supports this.
If you only need read-only access to the file, you could open it up in a browser and refresh when you want an update.
Look into Offline Files. In short, when you make a network-shared folder "Available Offline," Windows will keep a copy of all those files on your computer. This allows you to use these files when you're not connected to the computer sharing that folder. And--as you specifically asked for--Windows can also use your local copy even when the share is available for faster access.