files

What should a Multipart HTTP request with multiple files look like?

I'm working on an iPhone app that makes a multipart HTTP request with multiple image files. It looks like what's happening, on the server side, is that one of the images is getting parsed properly, but the other two files are not. Can anybody post a sample HTTP multipart request that contains multiple image files? ...

Different File Formats are stored differently

This might be a really trivial one. Is File storage OS dependant ? Why do text Files change when moved from Dos to Unix, is it that the Editor in Unix interpret certain characters differently or does the File itself change when moved from Dos to Unix and hence the utility Dos to Unix. Why a Java Class File can be moved from Dos to Un...

Getting the last access time for a file in Java

I know that using File object we can get the last modified time for a File. But, my requirement is to get the last accessed time for a file in Java. How do I get it? ...

Parsing strangely formatted files

I need to parse a file but the data is in a strange format that I'm not familar parsing. The data is always formatted like this. The field name is to the left and the data is right of the "=" and all fields are always in this order. File Data: Report 1 of 1 job_name = JOBNAME job_no = JOB99999 job_id = 6750 rprt_id = 27811 rprt_name ...

Caching a binary file in C#

Is it possible to cache a binary file in .NET and do normal file operations on cached file? ...

Java- Copy file to either new file or existing file.

Hi- I would like to write a function copy(File f1, File f2) f1 is always a file. f2 is either a file or a directory. If f2 is a directory I would like to copy f1 to this directory (the file name should stay the same). If f2 is a file I would like to copy the contents of f1 to the end of the file f2. So for example if F2 has the conten...

how to parse windows inf files for python ?

hi please help me. example inf file : ;============================================================================= ; ; Copyright (c) Intel Corporation (2002). ; ; INTEL MAKES NO WARRANTY OF ANY KIND REGARDING THE CODE. THIS CODE IS ; LICENSED ON AN "AS IS" BASIS AND INTEL WILL NOT PROVIDE ANY SUPPORT, ; ASSISTANCE, INSTALLATION, TR...

How do I determine which program is using a file in VB 2005?

Is there a way to get the program that is locking a file, in vb 2005? For instance, when I try to open a file that is already opened by another program, can I get the name of the process/program that has locked this file? ...

Unable to browse some pdfs and docs.

I have a web site that uses Microsoft Indexing Service to index and query a directory that holds various documents of type pdf, rtf, mht, and doc. The indexing and querying works well (for the most part); however, some files will load while others will not. This is a Windows Server 2003 box running the site using IIS 6. The indexed ...

how to get filenames from folder in C++

suppose I want to write ls or dir. how do I get the list of files in a given directory? something equivalent of .NET's Directory.GetFiles, and additional information. not sure about the string syntax, but: string[] filePaths = Directory.GetFiles(@"c:\MyDir\"); ...

Delete Files and Folders Issue

Hi there .... My project is a Web project built using three technologies : Icefaces for presentation layer. Spring for business layer. Hibernate for data access layer. My Project deployed on WebSphere 6.1 and the user can upload files, I use ice:inputFile component to handle the upload process... The first issue is: When the upload...

C# Configuration Files

Okay, so a while ahead I posted how to read other config files of other programs (here is the link Previous Post. I managed to do it. But now there is another problem. The scenario is like this, I have two programs. Program A reads its configuration from a config file and program B is only used to modify the contents of the config file w...

How to list contents of a server directory using JSP?

When writing a JSP file, how can I get the current directory of this file at runtime (to be able to iterate the directory and list its contents)? Would some file I/O operations be restricted because of some security issues? I would prefer a solution without accessing some implementation-specific server variables / properties. EDIT: I ...

How do you open an XML picture file?

I have a digital elgph camera and accidently pressed something that turned all my pictures into XML files, they all show up on my computer but i cannot open them. Is there any way i am able to open them? ...

Comparing files on the unix command line..

Suppose I have two files, A and B, and that lengthOf(A) < lengthOf(B). Is there a unix utility to tell if file B duplicates file A for the first lengthOf(A) bytes? If I do "diff A B", the output will be all the 'extra stuff' in the B file, which misses the point; I don't care what else might be in file B. If I do "comm A B", then I hav...

notepad++ regular expression to match files ending with same extention?

Hello, I have many lines like this in a sql file VALUES (12654, 'somestuff', 'some description here', 'filename.swf', '5', 0, 1, '', '500', '300', 'filename.png', '3', '1'); I want somthing to find filename.swf and replace them with folder/filename.swf and then do the same the same for png files I have very basic knowledge,...

Batch file to copy files to many machines

Hello, I need to have a batch file that copies files (8) in my local directory to either a list of machines on the network (hostname or IP) or have me prompt to enter the next hostname/ip I'd prefer not to have to run the script over and over again to enter the next hostname/ip I'll also need to see the output for each system to make ...

Powershell script to check application that's locking a file?

How will I do this in powershell. I like to check which process/application is using the file, so that I can close it. Thanks. ...

In Java, how can I avoid an HTTP 404 getting a file:// URL with special characters in it?

First I'll provide a tiny code snippet here: String path = "".equals(url.getPath()) ? "/" : url.getPath(); java.io.File f = new java.io.File(path); if (!f.exists()) { this.code = 404; // http Not Found return; } Here, the URL's type is java.net.URL,and its value has this format: file:///directory1/directory2.../filename t...

git: Find all uncommited locals repos in a directory tree

...