files

Adding custom/new properties to any file regardless of type and extension e.g. setting 'Author' on a .txt file

I want the ability add properties and tags to a file (specifically ebook files and ebook related properties in Windows 7 but interested to go so for as many OSes as possible) For e.g. Example.txt or Example.doc or Example.epub should all store and carry properties like 'Author', 'Publication date', 'Tags' etc.. the properties should b...

Including #includes in header file vs source file

I like to put all my #includes in my header file then only include my header for that source file in my source file. What is the industry standard? Are there any draw backs to my method? ...

Work with files exception

I want to create program which will tell me if a file is used or not by another processes (for example i open music or video file in multimedia player, and then i launch my program with this file name programm return "this file is being used", and when no processes uses this file program would say "this file not being used"). What clas...

Rails serving files per user

Hey. In my rails application each client has a file. This file must not be accessible to public, only to the user (authenticated user). How would you implement this functionality? ...

File Handler returning garbled files.

For the past 3 months my site has been using a PHP file handler in combination with htaccess. Users accessing the uploads folder of the site would be redirected to the handler as such: RewriteRule ^(.+)\.*$ downloader.php?f=%{REQUEST_FILENAME} [L] The purpose of the file handler is pseudo coded below, followed by actual code. //Chec...

Enumerating File Handles in C#

I would like to know whether it is possible to enumerate file handles in c#, maybe using Win32API. This is easily done for window and process handles, but it seems that it is not possible for file handles. While some functionality is offered by NtQuerySystemInformation, this is being phased out and therefore it is not recommended to us...

PHP - upload.class image and $_FILES

Hello, I'm using class.upload.php to upload pictures onto the server. Here is my form: <form action="<?="http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];?&gt;" method="post" enctype="multipart/form-data"> <table style="width: 100%; padding-top: 20px;"> <tr> <td>Image file:</td> <td><input type="file" name=...

simple c++ file opening issue

#include <iostream> #include <fstream> using namespace std; int main () { ofstream testfile; testfile.open ("test.txt"); testfile << "success!\n"; testfile.close(); return 0; } 1)called "g++ testfile.cpp" 2)created "test.txt" 3)called "chmod u+x a.out" 4)??? 5)file remains blank. I feel like an idiot for failing at somethin...

Python (windows) will open files from command line, but not from a script launched from eclipse

I'm pretty new to writing python for windows (linux is no problem), and am having problems getting python to recognize files when running scripts, though it behaves fine in the command line What am I doing wrong here? def verifyFile(x): # return os.path.isfile(x) This will return true (with a valid file, of course) when called ...

Processing CSV File

I am using Sebastien LorionReference CSV reader to process my CSV file in C# 3.0. Say example id|name|dob (Header) 1|sss|19700101 (data) 2|xx|19700201 (data) My Business Object is class Employee { public string ID {get;set;} public string Name {get;set;} public string Dob {get;set;} } I read the CSV stream and stored i...

Keeping files or database records? Java and Python

My website will use a Neural Network to predict thing based on user data. The user can select the data to be used in training the network and then use their trained network to predict things. I am using a framework to create, train and query the networks. This uses Java. The framework has persistence for saving a network to an XML file....

How to find all files in directory? (HTML JavaScript)

How to find all files in directory? I have HTML page in some directory. Using JavaScript I want to get all existing files in some subdirectory ( get all file names or relative links to them, on a local machine) ...

Open Folder and Select multiple files

In C# I want to open explorer and in this explorer window must be selected some files. I do this like that: string fPath = newShabonFilePath; string arg = @"/select, "; int cnt = filePathes.Count; foreach (string s in filePathes) { if(cnt == 1) arg = arg + s; ...

Simple Android File Output Problem

Hi everyone, I'm kinda stuck with something which must be appalingly simple. I'm trying to write a few variables to a file, each on it's own line so that I'll be able to use readLine in another method to read the variables back in. Here's the code: package com.example.files2; import java.io.BufferedWriter; import java.io.File; import...

WiX - Leave files after uninstall

Is there a way to NOT delete files after an uninstall? ...

files build execution order

Hi, I have a data structure which is as given below: class File { public string Value { get; set; } public File[] Dependencies { get; set; } public bool Change { get; private set; } public File(string value,File[] dependencies) { Value = value; Dependencies = dependencies; ...

How to convert pdf, ppt, xl, doc files to txt/html files... any opensource tools/codes in php/python/perl available?

My end objective is to index documents using lucene. As lucene doesnt support indexing other formats. I want to convert these files to txt/html (lucene indexable file types). I have a set of documents almost 1000 files of ppt, pdf, doc, xl etc Please help me ...

Filling own template files

What is the best way to fill a template file with variables, which are collected from a Windows Form or Web Page. I want to create a wizard program that collects some data from user, for instance, reportname, reporttype, etc. and I need to create then some xml files (templates) with these variables inserted. ...

Moving file security from one server to another (asp.net sites, IIS)

I am running windows server with asp.net websites and sql server 2008 and IIS 6. It is working fine. Now I need to move my asp.net websites to another windows server and I have hard time setting correct file security for the new server. Is there any way to compare or move or see difference file security between two servers? ...

batch file to merge .js files from subfolders into one combined file

I'm struggling to get this to work. Plenty of examples on the web, but they all do something just slightly different to what I'm aiming to do, and every time I think I can solve it, I get hit by an error that means nothing to me. After giving up on the JSLint.VS plugin, I'm attempting to create a batch file that I can call from a Visua...