Temporary file in storage


  1. Posts : 149
    Windows 7 Ultimate x64
       #1

    Temporary file in storage


    Yesterday, while investigating RAMdisks, and files in storage for temporary files I came across a couple of options on the file open call that could be used. One was "DeleteOnClose".

    I can't recall the other option, but the explanation stated "the effect of this is that the file is kept only in RAM". I seem to recall that it had something to do with temporary files.

    Can anyone help me locate this other option?

    I've looked at every page in my browser history, but for some reason I haven't found the page...
    Last edited by swiftie; 03 May 2015 at 03:03. Reason: Added explanation about temporary files
      My Computer


  2. Posts : 4,776
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #2

    Windows Temp Folder?


    Sounds like the option to move Windows Temp Folder onto the disk. If you're going to mess about with RAMdisks I suggest having a system image backup and restore option in place before going ahead.

    Temporary file in storage-ram-disk.jpg
      My Computer


  3. Posts : 149
    Windows 7 Ultimate x64
    Thread Starter
       #3

    What I saw was an option on the File Open call (or maybe the File Create). "DeleteOnClose" is obviously a File I/O option.

    The reason that I'm interested in these options is because I'm hoping to get the capability of temporary files in RAM implemented in my programming language of choice. Doing the research on what it involves is half of the battle.

    I'm happy enough with my Temp folder as it is, though I'm tempted to move it from C: (SSD boot drive) to D: (Internal Data drive).
      My Computer


  4. Posts : 4,776
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #4

    Okay I think that's probably beyond my understanding but thanks for making it clear!
      My Computer


  5. Posts : 4
    Windows 7 SP Professional 1, 64 bit
       #5

    swiftie said:
    Yesterday, while investigating RAMdisks, and files in storage for temporary files I came across a couple of options on the file open call that could be used. One was "DeleteOnClose".

    I can't recall the other option, but the explanation stated "the effect of this is that the file is kept only in RAM". I seem to recall that it had something to do with temporary files.

    Can anyone help me locate this other option?

    I've looked at every page in my browser history, but for some reason I haven't found the page...
    Since I am somewhat familiar with the CreateFile API function, I read your inquiry with interest. Although I may have missed it (as frequently I do), I didn't see a "delete on close" flag, although such a flag sounds familiar to me, too. Nevertheless, i found another flag that may come closer to meeting your requirements, and it is one of which I long ago made a mental note to investigate further. According to the official CreateFile documentation at https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx, I read the following paragraph.

    Specifying the FILE_ATTRIBUTE_TEMPORARY attribute causes file systems to avoid writing data back to mass storage if sufficient cache memory is available, because an application deletes a temporary file after a handle is closed. In that case, the system can entirely avoid writing the data. Although it does not directly control data caching in the same way as the previously mentioned flags, the FILE_ATTRIBUTE_TEMPORARY attribute does tell the system to hold as much as possible in the system cache without writing and therefore may be of concern for certain applications.
    I suspect this this flag comes closer to meeting your requirements.
      My Computer


  6. Posts : 149
    Windows 7 Ultimate x64
    Thread Starter
       #6

    Txwizard: file_attribute_temporary is exactly what I was trying to recall. Thank you!

    The description is exactly as I remember it. I have 16GB RAM, so most of my temporary files would fit.

    I'm looking for a neat solution to capturing the file output from utilities like wget, and this attribute would allow the authors of my favourite programming language to implement a robust but very fast temporary file mechanism.

    You've given me the facts that I needed to construct a strong "request for enhancement".
      My Computer


  7. Posts : 4
    Windows 7 SP Professional 1, 64 bit
       #7

    swiftie said:
    file_attribute_temporary is exactly what I was trying to recall. Thank you!

    You've given me the facts that I needed to construct a strong "request for enhancement".
    Here's to an enthusiastically accepted request.

    BTW, what is your favorite programming language?
      My Computer


  8. Posts : 149
    Windows 7 Ultimate x64
    Thread Starter
       #8

    txwizard said:
    BTW, what is your favorite programming language?
    Open Object Rexx
    It was developed with ease of use as one of its' main objectives; you could read and understand the Language Reference in one day.
    I'd used several languages before I encountered REXX (ranging from BASIC to S/370 Assembler) but it supplanted all of those. So much so that I've found it impossible to learn languages more appropriate to some environments (I've abandoned attempts at PERL, C).
      My Computer


  9. Posts : 24
    Windows 7 32bit
       #9

    Callender said:
    Sounds like the option to move Windows Temp Folder onto the disk. If you're going to mess about with RAMdisks I suggest having a system image backup and restore option in place before going ahead.
    Temporary file in storage-ram-disk.jpg
    thanks for the solution its really helpful for me. i also looking for it and finally got solution with this post
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 14:25.
Find Us