temporary-files

Writing to temp dir fails when running as SYSTEM on Win7

We have a Java application that includes components that run as SYSTEM on Windows machines. On Windows 7 x64, one component fails when trying to unpack the jnidispatch library: Exception in thread "main" java.lang.Error: Failed to create temporary file for jnidispatch library: java.io.IOException: The system cannot find the path specifi...

How Can I Delete Temporary Internet Files/Content.IE5/Index.dat?

Without purchasing someone elses software, how can I as a software engineer, delete index.dat? What OS Voodoo hoops do I have to jump through to accomplish the simple deletion of a single file on my own computer? I have windows Vista. ...

Looking for a place to store temporary .class files on Windows (some similar app support on Mac)

Possible Duplicate: Storing a file in the users directory in cross-platform Java I am working on a java project and the java application ends up making some .class files. Currently, these files are stored inside a projects directory inside the main application directory. Some people who run the application on a network with a ...

Using an encrypted file securely

I'm writing an application with a dBASE database file in Borland Delphi 7. Note: I think this question is file-security related and you can forget the dBASE thing (consider it as a TXT file) in this question. The database must be accessed just by the application. Then it must be encrypted. Unfortunately dBASE doesn't support any passwo...

Web Services, Temp Files, and Program Memory

My team is currently developing a resume-parser for a website. Our parser will translate and format the resume into the industry-standard HR-XML. The website will then take the HR-XML-formatted information and pre-populate editable fields so the user can finalize his/her profile on the website. What would be the best way to port the H...

Rails - Creating temp files in a portable way

My rails application runs on a Ubuntu server machine. I need to create temporary files in order to "feed" them to a second, independent app (I'll be using rake tasks for this, in case this information is needed) My question is: what is the best way of creating temporary fields on a rails application? Since I'm in ubuntu, I could creat...

Cleaning ReSharper's TestResults files?

I'm using ReSharper 4.5 to execute my MSTest unit tests in VS2008. With each test run, it's creating files in this path: testProjectFolder\bin\Debug\TestResults How can I clean/delete those files from within Visual Studio? If I can't delete them from within Visual Studio, when can I expect them to be removed? EDIT: I see Visual Stu...

Are files in the temporary folder automatically deleted?

If I create some file using Path.GetTempPath() - does it automatically get deleted at some stage, or is it up to me to delete it? ...

Reusing the temporary file created by a file upload in a PHP form

Hi, regarding file uploads, I have a form through which I upload a file, I get the $temp_name = $_FILES['name']['temp_name'] and store it in a variable. Can I then use that variable again inside move_uploaded_file("$temp_name","$location") inside another form. Will this work?? When we upload a file, there is a temp location created o...

Identifying Microsoft Office temporary files

I'm watching a directory using FileSystemWatcher. When a file is copied into that directory - my watcher grabs it and performs multiple actions with it. My problem is that when a Microsoft Office file is opened, a temporary file is created in the watched directory. I can't find a way to ignore these files. Though the temporary file na...

Temporary operation in a temporary directory in shell script

I need a fresh temporary directory to do some work in a shell script. When the work is done (or if I kill the job midway), I want the script to change back to the old working directory and wipe out the temporary one. In Ruby, it might look like this: require 'tmpdir' Dir.mktmpdir 'my_build' do |temp_dir| puts "Temporary workspace is ...

How do I create a named temporary file on windows in Python?

I've got a Python program that needs to create a named temporary file which will be opened and closed a couple times over the course of the program, and should be deleted when the program exits. Unfortunately, none of the options in tempfile seem to work: TemporaryFile doesn't have a visible name NamedTemporaryFile creates a file-like...

WIX: Using a temporary file during install

Hello! I am writing a WIX installer and I have a following requirement: During installation, I need to pass an absolute path to a file (lets call it A) included in my installer to a COM component, which already exists on the hard drive and is a part of another program. I have already written an appropriate Custom Action which expects a ...

using a "temporary files" folder in python

I recently wrote a script which queries PyPI and downloads a package; however, the package gets downloaded to a user defined folder. I`d like to modify the script in such a way that my downloaded files go into a temporary folder, if the folder is not specified. The temporary-files folder in *nix machines is "/tmp" ; would there be any ...

C# On Quit WebPage Delete Files and Folders on Server with no user action

Hi, I have some problems to delete temporary folder and files on my server when users not finish some action in webpages and quit to other webpages. Initialy at Page Load folders are created to allow the user to load files.I have tried implementing destruction during Idisposable without success. Could someone point the best method to del...

Cleaning up temp folder after long-running subprocess exits

I have a Python script (running inside another application) which generates a bunch of temporary images. I then use subprocess to launch an application to view these. When the image-viewing process exists, I want to remove the temporary images. I can't do this from Python, as the Python process may have exited before the subprocess com...

ASP.NET Schedule deletion of temporary files

Question: I have an ASP.NET application which creates temporary PDF files (for the user to download). Now, many users over many days can create many PDFs, which take much disk space. What's the best way to schedule deletion of files older than 1 day/ 8 hours ? Preferably in the asp.net application itselfs... ...

Hiding the removal of intermediate files using Make

I use intermediate files in my Makefile, however make prints out the rm command that it uses to delete them all afterwards. How do I hide this print statement? ...

Windows temporary file in Java

How to create a file in Windows that would have attributes FILE_ATTRIBUTE_TEMPORARY and FILE_FLAG_DELETE_ON_CLOSE set using Java? I do want my file to be just in-memory file. To precise: delete-on-exit mechanism does not satisfy me, because I want to avoid situation, when some data leaves on disk in case, for example, application crash...

Why doesn't this simple Ruby program print what I expect it to?

I have this: require 'tempfile' t = Tempfile.new('test-data') t.open t.sync = true t << "apples" t.puts "bananas" puts "contents are [#{t.read}] (#{t.size} bytes)" t.close This prints: contents are [] (14 bytes) Why aren't the contents actually shown? I'm on Ruby 1.9.2. ...