file

Tomcat actual path for new file creation

If in a JSP page I create a new file only giving it's name, it's created in the /bin directory of TOMCAT folder, rather in the same folder of the .jsp. I'm not sure why this happens, seems to be not intuitive. ...

Save a portion of my program’s own window to a bitmap file using mfc/win32.

Within my mfc program, I need to programmatically capture a portion of that program’s own window, then save it out as a file (bmp or jpg etc). How to do this without using 3rd party library? ...

how to detect "hidden files extension" (windows system ) from flash/as3 app?

hi, i'm working on an app (flash/As3) that lets the user upload and edit an image, and then save it to the computer, using FileReference. it's posible to know if the user computer have the option "hidden file extensions" (windows system) selected? How can i do it? thanks ...

Are there any good free file management components for asp .net?

Hi, I'm looking for a decent file management control for ASP .Net that I can integrate into an existing website. The requirement is that the user should be able to upload / download documents of various file types as well as edit / delete them. I've seen the Telerik FileExplorer and it looks ideal. However, I would like to determine wh...

How to copy file from a local computer to a remote computer?

I tried with WMI but doesn't work. I also tried this with LogonUser but it doesnt work because LogonUser only works for local computers. So how can I copy a file or at least get connected to the computer so it accept System.IO.File.Copy? ...

I want to add commands (shell scripts etc.) to Eclpise Package Explorer or Navigator

I'm in desparate need for a functionallity I miss in Eclipse: Right click on a file in Navigator (or a resource in package explorer) and execute a command on it, like "chmod a-w". Google did not bring anything up, likely I use the wrogn search terms. I assume someone must have written a plugin for that ... I'm helping myself right now...

ASPX: Get path of cs file

How can I get the path of a cs file in aspx? Here's the issue: I've created a property class in a property.cs file which is used in an EPiServer admin module. Server.MapPath() will hence return the path of the executing file, which is in a totally different place than my code. I need to get the path of the property.cs file (from inside ...

Using files in Check test cases

I need to use a file for one of my tests written using Check. I initially hardcoded the path, which worked fine. However, this didn't work when the code is built outside of the source directory. I came up with the following solution which somewhat works. (I then prefix pathnames with TESTS_DIR) # Set correct directory for test files AS_...

PHP rename file on same host

$url = 'http://site.com/images/name.jpg'; Its a full path for the file, which is already exists on ftp. How can I change file's name? ...

Difference between file.is_open() and file.fail()

Initialization of file: ifstream file("filename.txt"); What's is the difference between if ( file.is_open() ) and if (! file.fail() ) ? What Should I use to make sure if the file is ready for I/O ? We assume that variable file contains a object of a file stream. ...

I want to make a batch file with the path and commands i used

Hello I want to make a batch file from the below given procedure.. my original directory was C:/Users/Suvin..I changed the Directory to C:/AnimationApp.. After this i setted the path as set path=C:\bada\1.0.0b3\Tools\Toolchains\Win32\bin%path%C:\bada\1.0.0b3\Include..Then i setted the environmenat variables as set CPLUS_INCLUDE_PATH=C:\b...

How to create a file input which allows multiple files to be selected?

Hi there, how do I create a file input which allows multiple files to be selected and uploaded? It seems that <input type="file" name="fileinput"> allows only 1 file to be selected at a time, while the input on http://filetolink.com/ (for example) let's the user select multiple files. How is this done and how do I go about processing...

PHP to delete lines within text file beginning with 0 or a negative number

Hi there, Thank you for taking the time to read this and I will appreciate every single response no mater the quality of content. :) Using php, I'm trying to create a script which will delete several lines within a text file (.txt) if required, based upon whether the line starts with a 0 or a negative number. Each line within the file ...

php file upload permissions ?

Hi, I have developed a download/upload manager script that will be used by many people. When i upload a file via POST method it is stored in a folder called files , the files folder is within another folder called download-manager. Now it seems when i upload via the POST method 0666 CHMOD works when i want to rename, delete the file b...

select() doesn't wait

Hi, I've to read program log file and to do that I wanted to use select() and read() #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/select.h> #include <fcntl.h> #include <stdio.h> int main() { int fd = -1; fd_set fds; struct timeval tv; int rc; char buffer[4096]; char * log_path = "/...

Basic input file parsing in R

I'm used to perl and new to R. I know you can read whole tables using read.table() but I wonder how can I use R to parse a single line from an input file. Specifically, what is the equivalent to the following perl snippet: open my $fh, $filename or die 'can't open file $filename'; my $line = <$fh>; my ($first, $second, $third) = split ...

Rename different files to one file name, one at a time

i have files named.. 82011.nsf 63113.nsf 55555.nsf i must rename each file to single.nsf (for example ren 82011.nsf to single.nsf) then use a program to act on that file (single.nsf) then rename the next file (63113.nsf to single.nsf) then use a program to act on that file (single.nsf) etc I want a batch file to do the nename, pau...

php file upload size question

I know you can control the size of uploads in PHP using $_FILES['userfile']['size'] > XXX My question I suppose is performance related. When you upload a file, my understanding is the whole file gets uploaded to a temporary location, and then you have access to $_FILES What happens if a user attempts to upload a 10gb file? (as an exa...

read excel file in j2me

Hi i have excel file , i want to use it like data base on j2me . how can i read excel file in j2me ? thanks ...

I think I am looking for the ESC char to use in a DOS Batch file

The code that is confusing me: set CLEAN=\Users\%USERNAME%\Documents\Directory One\Sub Directory\30% Dalton.txt IF EXIST %CLEAN% echo "It Works" This code will never work because the file name has a " % " char Is there a way to get around this and produce the Echo "It Works" ...