file

NERDtree for Emacs

Surely an alternative or superior package exists for Emacs? ...

Recursively search for files of a given name, and find instances of a particular phrase AND display the path to that file

I have a bunch of folders and subfolders. Each one contains, amongst other things, a text file called index.yml with useful data. I want to search through all of the different index.yml files to find instances of a search string. I must be able to see a few lines of context and the directory of the index.yml file that was found. This...

Indexing files and quickiest way to find a file in folders?

Hi, I have 660000 xml files(with unique file names) in 22 folders. Each folder has 30000 files. I need to find them by their names efficiently in a C# application. I know there is a SearchIndexer service in Windows(?Vista+?) and I was just wondering if I can use that or I have to index the files myself? Alternatively, I guess I could c...

Python error "IOError: [Errno 2] No such file or directory" but file is there

I am trying to read a csv file and I am getting the error above but the file is there. The line giving the error is infilequery = file('D:\x88_2.csv','rb') and I get the error below. Traceback (most recent call last): File "C:\Python26\usrapply_onemol2.py", line 14, in infilequery = file('D:\x88_2.csv','rb') IOError: [Errn...

PHP CMS file sharing with rating

I need to set up a community web site to allow people to share binary files in some specific binary format. Files will be visible to everyone. I want users to be able to vote and leave comments about files I also want to count downloads. I'm googling for CMS that does just that, or plug-in for Joomla or Wordpress or Drupal, but I cannot...

reading from a file line by line.

I want to read a txt file line by line. I am getting the error"the device is not ready". I can't understand what the problem is? The code is as follows: #include<stdio.h> #include<stdlib.h> int main(int argc, char **argv) { char command[100]; char line[10]; FILE* fp = fopen("input.txt","r"); while (fgets(line, sizeof line, fp) ...

How to find out if a file or directory exists?

Hi. I am trying to make a simple program that handles files and directories, but I have two major problems: how can I check whether a file or directory exists or not, and how do I know if it is a file, directory, symbolic link, device, named pipe etc.? Mainly file and directories matter for now, but I'd like to know the others too. ...

Copying a file off an android device?

How can I copy a file from some Android app's assets folder, to somewhere off the device? Alternatively, how can I move or copy an app so that it is installed on the sd card, not the main rom? Peter ...

Codeigniter - How to make a file upload field non mandatory?

Hi, I have a form which has 5 file input fields, all works fine with my CRUD methods if the file field is not empty, however the client now wants to set some of the fields to be non mandatory. This is how I am trying to do it in my code, the problem I am encountering is declaring a null variable(to insert a blank value in the respectiv...

Quickly find differences between two large text files

I have two 3GB text files, each file has around 80 million lines. And they share 99.9% identical lines (file A has 60,000 unique lines, file B has 80,000 unique lines). How can I quickly find those unique lines in two files? Is there any ready-to-use command line tools for this? I'm using Python but I guess it's less possible to find a ...

Manager gives a queryset from files and not from a database

I would like to override the manager class in order to allow content data to be loaded from text files (here on of "/one directory/myPrefix_*") into content field instead of from a database table. class Things(model.Models): file = CharField(max_length = 25, primary key = True) content = TextField() objects = myManager("/...

File Transfer Mediator

Hi I am searching for a ready made solution for the following problem: I have 3 computers, A, B and C. I want to transfer file(s) from computer A to a specific directory(s) in computer C. The problem is that the transfer speed is very low between A to C and therefore I want that B will be a mediator. I want that to transfer the file(s) f...

Platform independent paths in Java

I know the relative path of a file, and want to be able to handle it as a File object on both Linux and Windows. What is the best way to specify platform-independent paths in Java? ...

compiler says:cannot convert int to FILE*

While doing filing im stuck here.The condition of the while loop is not working.The compiler says cannot convert int to FILE*. while(pFile!=EOF); Should i typecase the pFile to int?I tried that but it did not worked.Thanks in advance. The complete code is: int main() { char ch; char name[20]; FILE *pFile; int score; ...

Best way to assert compatible architecture when reading and writing a file?

I have a program that reads and writes a binary file. A file is interchangeable between executions of the program on the same platform, but a file produced on one machine may not be valid on another platform due to the sizes of types, endian-ness etc. I want a quick way to be able to assert that a given file is valid for reading on a g...

How to find /open file from PC

Hello all, you experts probably knowing the easyiest ways to open/find a file from asp.net mvc application. could you tell me please how to do that, if i want for example to find and upload a photo from my PC. Thanks and take care, Ragims ...

Select time intervals from log files using Bash

I need to extract some information from a log file using a shell script (bash). A line from the log file usually looks like this: 2009-10-02 15:41:13,796| some information Occasionally, such a line is followed by a few more lines giving details about the event. These additional lines do not have a specific format (in particular they d...

Delete file event for .NET

I want to get an event Before a file is being deleted? How can I do it? ...

generate word document file from template having .dot file template.

Hi , I am working on a requirement where I have to generate word document file from template having .dot extension. I have gone through all the options available on internet but did not get the sound examples and ideas. I am lacking information on it hence not able to go forward. Please guide me regarding the same. I have to complete...

Read the first line of a file from memory

Hello all. I have a tab delimited text file that I need to upload to a secure folder for SSIS to import into SQL Server. The file will be uploaded by an external user VIA a web app. My challenge is that I need to check this file for some things before I am allowed to let it go to the secure folder. Namely I need to make sure the us...