file

Monitoring files/directories with python

I'm looking for a cross-platform file monitoring python package? I know it is possible to monitor files on windows usung pywin32, and there are packages working on Linux/Unix but does anyone know about a cross-platform one? ...

File upload/download problems using Internet Explorer to a Sharepoint site

A cheeseburger to the first person who can help me make sense of this. I have a page in a Sharepoint app that uses Telerik's RadUpload to upload files. This has worked for months; last week it stopped working (in Internet Explorer, this detail is important). After talking with a co-worker about the problem, I tried the upload with Fir...

How do I tell a file from directory in Python?

When using os.listdir method I need to tell which item in the resulting list is a directory or just a file. I've faced a problem when I had to go through all the directories in this list, and then add a file in every single directory. Is there a way to go through this list and remove all files from it? If it isn't possible to do with ...

C++ FILE readInt function? (from a binary file)

Is there a function for FILE (fopen?) that allows me to just read one int from a binary file? So far I'm trying this, but I'm getting some kind of error I can't see cause the program just crashes without telling me. void opentest() { FILE *fp = fopen("dqmapt.mp", "r"); int i = 0; int j = 0; int k = 0; int * buffer; ...

What unix command can we use to append some text to a specific line in a file?

Does anyone know of a series of unix commands that allows someone to append some text to the end of a specific line in a file? eg Line 1 Line 2 Line 3 Line 4 I wish to append the text ", extra information" to Line 3 so that the File will now look like this: Line 1 Line 2 Line 3, extra information Line 4 ...

Get file name from URL

In Java, given a java.net.URL or a String in the form of http://www.example.com/some/path/to/a/file.xml , what is the easiest way to get the file name, minus the extension? So, in this example, I'm looking for something that returns "file". I can think of several ways to do this, but I'm looking for something that's easy to read and sh...

C++ and C file I/O

C++ file i/o is tougher than c file i/o. So in c++, creating a new library for file i/o is useful or not? I mean Can anyone pls tell are there any benefits in c++ file i/o ? ...

Delphi: Open a file from another computer

Hi, my names's Carlos Im from Brazil. Im trying to open a file like this: image1.picture.loadfromfile('\\ntmemo01\c$\ozzy2.bmp'); but it doesnt work. Im receving the exception class EFOpenError with message "Cannot open file '\ntmemo01\c$\ozzy2.bmp' Access denied." Thanks, Carlos ...

Preserving last new line when reading a file

I´m reading a file in Python where each record is separated by an empty new line. If the file ends in two or more new lines, the last record is processed as expected, but if the file ends in a single new line it´s not processed. Here´s the code: def fread(): record = False for line in open('somefile.txt'): if line.starts...

Does Wippien use a direct connection?

I started using Wippien to make p2p connections between 2 distant Windows Servers. I use 2 different GMail Accounts. Wippien uses "Mediators" to initiate the connection. But are mass data transfers really direct, or is it routed through the mediator? I also found this article which seems related: http://stackoverflow.com/questions/442...

Create a temporary directory in Java

Is there a standard and reliable way of creating a temporary directory inside a Java application? There's an entry in Sun's issue database, which has a bit of code in the comments, but I wonder if there is a standard solution to be found in one of the usual libraries (Apache Commons etc.) ...

Ruby file force copy

Is there a way to get ruby to do a forced copy? FileUtils.cp_r seems not to have a :force => true option. ...

Determining binary/text file type?

Namely, how would you tell an archive (jar/rar/etc.) file from a textual (xml/txt, encoding-independent) one? ...

How do you get a file in C++?

So the teacher has posed this assignment: You have been hired by the United Network Command for Law Enforcement, and you have been given files containing null cyphers you have to decrypt. So for the first file given (as an example), every other letter is correct (ie: 'hielqlpo' is hello (assuming you start with the first letter). My f...

File Signatures: How do I make sure that a Windows DLL isn't modified?

Hi all. I once asked a question here if Windows DLLs are signed by Microsoft. I realized they were, and a good friend told me that the SigCheck utility can provide information about the signature of files; but a question remained: While SigCheck tells me if a file is signed, I need to be sure that Microsoft signed the file and no one e...

COM-Interface for accessing file information (title, subject, author)?

Hi, On NTFS, any file can have extended file information based on an Alternate Data Stream. Explorer displays this as a tab in the file properties dialog. I am quite sure there is a COM-Interface for reading/modifying this information, but I seem to be unable to come up with the right terms for my search. Can anyone give me a short poi...

Setting file version for a codeDOM file

I'm looking for ANY means of setting the file version for an exe file generated using codeDOM. Mine always comes out as 0.0.0.0. Programatically would obviously be preferred, but at this point anything would be better than nothing. ...

How do you read a word in from a file in C++?

So I was feeling bored and decided I wanted to make a hangman game. I did an assignment like this back in high school when I first took C++. But this was before I even too geometry, so unfortunately I didn't do well in any way shape or form in it, and after the semester I trashed everything in a fit of rage. I'm looking to make a txt ...

How to submit a file's original path and filename without submitting the file itself in ASP.NET?

How can I have a control on a ASP.NET form that browses for files as FileUpload control does, but instead of submmitting the whole file, it only submits the path from witch the file was found from (with the original file name)? ...

File not found. Why not?

Okay, I'm trying to load a file in Java using this code: String file = "map.mp"; URL url = this.getClass().getResource(file); System.out.println("url = " + url); FileInputStream x = new FileInputStream("" + url); and despite the file being in the same folder as the class it says it can't find it (yes, it is in a try catch block in the...