Questions tagged [file-processing]

333 questions
1
vote
1 answer

How to process many csv files into many separate dat files

I have several thousand csv files I wish to reformat. They all have a standard filename with incremental integer, eg. file_1.csv, file_2.csv, file_3.csv, and they all have the same format:…
1
vote
0 answers

Read from a file ints and floats to store them in a two dimensional array

I want to read from a file ints and floats, and then I want to store them in a two dimensional array. Let say I have a file with two columns. First column integers, and second column floats. Let say I have a 20 row define SIZE 100 //100 entries…
1
vote
2 answers

Processing a binary file - templated functions problem

I've created a small tool which is used to process binary files. All the functions involved in reading the files and processing them are templated and are similar to this: template void processFile( const char* fileName ); The template…
PeterK
  • 6,287
  • 5
  • 50
  • 86
1
vote
1 answer

Only One Line Of File Not Being Handled Correctly By Dijkstras Algorithm

I am new to StackOverflow and i just want to say thank you for all of you guys hard work! I am having a very strange behavior with my program to compute the shortest path from information given in a file. My file has a format of Source1 Dest Cost…
1
vote
1 answer

Handle Commas While Reading Text?

My code is trying to read all log files throughout the specified directory in rootDir and write certain pieces of information from that log file to an outputFile The issue I'm having is searchObj_Archive_date.group(), fullpath,zDiscsVar,zCopiesVar,…
pHorseSpec
  • 1,246
  • 5
  • 19
  • 48
1
vote
1 answer

How to execute a series of file processing shell commands in a single execution?

I have to process a text file and i have a series of commands to execute it.Now i would like to process it in a single execution.Not sure how this can be achieved. :1,$:s/\\n \\"ccl/\rccl/g :1,$:s/\\n …
Arun
  • 33
  • 3
1
vote
2 answers

Store user input as wildcard

I am having some trouble with a data processing function in MATLAB. The function takes the name of the file to be processed as an input, finds the desired files, and reads in the data. However, several of the desired files are variants, such as…
Kelly
  • 121
  • 1
  • 5
1
vote
1 answer

how to process big file with comparison of each line in that file with remaining all lines in same file?

I have csv file with 5,00,000 records in it. Fields in csv file are as follows No, Name, Address Now i want to compare name and address from each record with name and address of all remaining records. I was doing it in following way …
1
vote
1 answer

PHP : how to process the files _alphabetically_ using DirectoryIterator?

Using this way, after the completion of DirectoryIterator cycle you will get a list of filenames, and later you will be able to alphabetically sort it, so that you can process each file with a filename from this list - in alphabetical order... Now,…
Jake Badlands
  • 1,016
  • 3
  • 23
  • 46
1
vote
4 answers

For Loop Replacement: For Loops to Filters

I'm working on an assignment for a Computer Science III class (Java programming), and in it we have to encode a file based on Huffman coding. import java.util.Scanner; import java.util.ArrayList; import java.io.*; import…
JonMcDev
  • 43
  • 1
  • 7
1
vote
1 answer

how to process multiple uploads using perl?

I am struck at this point since 1 day. First am taking all file names .Then upload and collect all file handles. Due to some reason, files are not uploading into /home/img folder correctly. If uploaded, they are getting corrupted. Corrupted filesize…
1
vote
2 answers

How to multithread file processing in C++?

I'm working on one problem where I need to process 24 files (each size = 3 GB) and write the output into multiple files (24). Each file takes around 1 hour to process. Is it possible to write data into multiple files concurrently using…
DNamto
  • 1,342
  • 1
  • 21
  • 42
1
vote
1 answer

Error while using '.readlines()' function

The goal was to import the infile, read it, and print only two lines into the outfile.This is the code I had in IDLE: def main(): infile = open('names.py', "r") outfile = open('orgnames.py', "w") for i in range (2): line =…
Manaar
  • 202
  • 4
  • 15
1
vote
1 answer

File Processing with Workflow Foundation

I have been tasked with building a new workflow system to handle our service orders. I have been investigating Windows Workflow Foundation as the engine for managing the workflow steps, and like what I see up until file processing. We have a step…
Edison
  • 129
  • 8
1
vote
4 answers

read multiple lines and consolidate to single line

I want to process a file in such a way that, read from multiple lines and make a new file which will have a single line corresponding to this. For eg.: Input File: 12345 1 - - - 12346 - 2 - 4 12347 - - 3 - 12348 5 - …