Questions tagged [filesplitting]

87 questions
1
vote
0 answers

Python 3.6 Recursively Write to Multiple Text Files

My existing, and working code is: #!/usr/bin/env python3 import glob import xml.etree.ElementTree as ET filenames = glob.glob("C:\\Users\\####\\Desktop\\BNC\\[000-ZZZ]*.xml") out_lines = [] for filename in filenames: with open(filename, 'r',…
pglove
  • 133
  • 1
  • 9
1
vote
1 answer

Why can't I reach the correct solution in my file splitting program (Java)?

About the code: Basically I'm writing a program that would split a given huge text file into smaller 'n' number of files of size 10 MB. Workflow of the code: Opens source file, find number of lines present in file. Calculate approximate…
1
vote
1 answer

How to split file based on wild card matching in first column of a csv file

I have a csv file abc,ds,adsa bca,sds,ds cdf,ds,sds abk,sds,ds I want this file to be split in two files only where one should have all values of first column valuestart with "ab", and rest in other file. My final output should be file1.csv as…
Prem
  • 11
  • 2
1
vote
0 answers

How can I improve the efficiency of my simple file-splitting program

I have a simple program that reads a .txt file, and then splits it up into many files of "pMaxRows" number of rows. These .txt files are huge - some are nearly 25Gb. Right now it is not running fast enough for my liking, I feel that there should be…
Bryan
  • 67
  • 1
  • 1
  • 8
1
vote
0 answers

Split Concatenated, Minified, Uglified JavaScript into Multiple Files with Grunt

Right now, I have a grunt task for building out my JS application. It uses useminPrepare/usemin to control the concat, minify, and uglify process, and outputs the result as a single output file. This works great for our application. Now we're…
tmanion
  • 401
  • 2
  • 11
1
vote
0 answers

What is the most efficient technique to convert PDFs to images on Linux command line?

I have a PDF page of n pages as input. On every m-th page, there is a area which I want to crop and save as an image. Concrete example: 500 page PDF on every 10th page, I want to crop the area from point (10,10) to (110,110) and save it as a…
spaudanjo
  • 764
  • 7
  • 13
1
vote
1 answer

Split a text file into muliple files

My sample text file is the following: 1. -77.41936 37.238461 2. -77.41932 37.238466 3. -77.419275 37.238454 4. -77.419247 37.23843 5. -77.419235 37.2384 6. -77.419243 37.238363 7. -77.419268 37.238337 8. -77.419292 37.238326 9. …
1
vote
2 answers

A way to split a huge XML file into smaller xml files with XSL

I get a huge XML file containing a list of TV broadcasts. And I have to split it up into small files containing all broadcasts for one day only. I managed to to that but have two problems with the xml header and a node being there multiple…
user291348
1
vote
2 answers

Coping with for loop batch file issues when splitting a text file

Good Afternoon! Long time reader, first time poster! I have been having a lovely time trying to modify a working batch file to account for variability. The situation is that I have a variable-size text document that normally would be able to be…
1
vote
1 answer

Can we split and join the large text files

I need to split large text files around 10 GB into multiple text files (mostly 1gb files) and join those same text files into one file.
Bobby
  • 320
  • 5
  • 23
1
vote
4 answers

split sorted file using python at change of value

I am new to python. My requirement, which is simple if I have to do it using awk, is as below, File (test.txt) mentioned below is tab separated, 1 a b c 1 a d e 1 b d e 2 a b c 2 a d e 3 x y z The output I want it like file 1.txt should have…
1
vote
1 answer

Hadoop FileSplit reading

Assume a client application that uses a FileSplit object in order to read the actual bytes from the corresponding file. To do so, an InputStream object has to be created from the FileSplit, via code like: FileSplit split = ... // The FileSplit…
PNS
  • 19,295
  • 32
  • 96
  • 143
1
vote
1 answer

Hadoop Distribution File System

I would like to modify the way an input file is split into blocks and stored in Hadoop Distributed File System.(example it splits the file based on block size but my application requires to split the file based on the file content). So i would like…
user1938899
  • 41
  • 1
  • 3
0
votes
0 answers

Merging a Files

My goal to achieve merge long files 500 mb to 1gb File. i have merged all files but the issue is Write a file but memory usage is very low then app crashed. Can you guide me how to cattle this problem.if i merged 46 files then some time show…
0
votes
2 answers

How to split a file by using string as identifier with python?

I have a huge text file and need to split it to some file. In the text file there is an identifier to split the file. Here is some part of the text file looks like: Comp MOFVersion 10.1 Copyright 1997-2006. All rights…
Cheries
  • 834
  • 1
  • 13
  • 32