i was writing a script on Windows Vista to move the files in a folder to another hard drive, but found that Ruby 1.8.6 or 1.9 both would get back filenames with Unicode characters in it replaced by "??????"
so for example, the filename "Chart for ???????.doc" is returned
so the file cannot be moved at all...
i used
filename.each_byt...
hello there,
i m having trouble in uploading multiple files with same input name:
<input type=file name="file">
<input type=file name="file">
<input type=file name="file">
at django side
print request.FILES :
<MultiValueDict: {u'file': [
<TemporaryUploadedFile: captcha_bg.jpg (image/jpeg)>,
<TemporaryUploadedFile: 001_using_git_wi...
I have a program writing/reading from a file, and I want to lock the file for other instances of my application. How can I do it (in c++ visual studio 2003)?
I tried using the _locking() but then also I myself cannot reach the file when trying to read/write (in the same instance).
I know there's an option of LockFile() but have no idea ...
I have a directory src/ that contain many .cc files and its binary.
For example:
src/
|_ foo.cc
|_ bar.cc
|_ qux.cc
|_ thehead.hh
|_ foo (executable/binary)
|_ bar (executable/binary)
|_ qux (executable/binary)
|_ makefile
In reality there are many .cc and executable files.
I need to remove those binaries in a glob...
I've see this sort of thing in Java code quite often...
try
{
fileStream.close();
}
catch (IOException ioe)
{
/* Ignore. We do not care. */
}
Is this reasonable, or cavalier?
When would I care that closing a file failed? What are the implications of ignoring this exception?
...
What does a zipped html file using zlib (deflate) look like sitting on the server? Does it have a different extension than .html?
...
I'm Using FILE * F opened in _sfopen () I'm reading from the file in while(!feof(f)) and then fgets(str,1024,f) when running reaches the last line it still goes in the while but then when trying to fgets it flies out with an access violation arror (menwhile I just put a try and catch(...) but I know It's not a good solution ) what shou...
Hi
I'd like to wrap a bunch of files (an .exe a .xml, some images) in 1 executable package. When the user launches this executable package the .exe included in this executable package should run. Is this possible in the first place on the windows platform?
What I'm not looking for is a self extracting zip or an installer because both o...
I'm writing a JUnit test for some code that produces an Excel file (which is binary). I have another Excel file that contains my expected output. What's the easiest way to compare the actual file to the expected file?
Sure I could write the code myself, but I was wondering if there's an existing method in a trusted third-party library (...
Writing a small app that (among other things) lets users upload a file (like an image, a .doc or a text file) as part of their posting/submission.
Our current prototype just dumps the file into /{app_root}/files/, but of course, anyone can get to that even if they are not logged in or using the system. The goal is to only grant access ...
I use the DeleteFile and CopyFile methods. Do these functions throw exceptions or just set errno and lastError? Do I need to surround this code with try and catch?
...
I'm using C to write some data to a file. I want to erase the previous text written in the file in case it was longer than what I'm writing now.
I want to decrease the size of file or truncate until the end. How can I do this?
...
Do you know of any open source fileupload servlets that are integrated with the ICAP protocol? I believe it is important to virus scan user uploaded files prior to writing to disk and would like to leverage this method.
...
I want to truncate the file something like setsizeof() with FILE *
I'm developing vs 2003 windows
#include <unistd.h> there's no such lib
how can I do it freopen() truncates all the data vut doesn't write- getting EINVAL error
some help?????
...
For recreational reasons I wrote a PHP class that classifies files with tags instead of in a hierarchical way, the tags are stored in the filename itself in the form of +tag1+tag2+tagN+MD5.EXTENSION and thus I'm stucked with the chars limit (255) imposed by the FS/OS. Here is the class:
<?php
class TagFS
{
public $FS = null;
f...
I wrote a script that reads each file in a directory, does something and outputs results from each input file to two different files, e.g. "outfile1.txt" and "outfile2.txt". I want to be able to link my resulting files to original ones, so how can I add input filename (infile.txt) to the resulting filenames, to get something like this:
...
The recent documents feature in Office is really useful, but I moved a file to a new directory and now I can't get Excel to stop hitting me with a "can't find this file" notification whenever I open a workbook. The Excel options seem only to control how many of these "recent documents" are displayed and not how many are actually saved. ...
Hello all, I am looking for a way to create a program in unmanaged c++ that waits until a file is unlocked (as in it is no longer in use) and than does something. I have had no luck locating how to do this, any help would be appreciated!
UPDATE: I may have answered my own question, see below and tell me what you think..
UPDATE: All th...
I would like to temporarily impersonate a domain user account to read in a file on a network drive from an ASP.NET site.
I would rather not set up impersonation for the entire site or set up a mapped drive on the server.
...
I originally had a set of images of the form image_001.jpg, image_002.jpg, ...
I went through them and removed several. Now I'd like to rename the leftover files back to image_001.jpg, image_002.jpg, ...
Is there a Linux command that will do this neatly? I'm familiar with rename but can't see anything to order file names like this. I'm...