ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Merge .txt files but with the copy/paste method

<< < (3/5) > >>

alogoc:
To be honest, I can't make a program to do it for you.
Maybe Drag and Drop Robot could help.
In linux, I'd use SED to replace the tabs with spaces. I don't know of any similar tool in windows, though :(
-jgpaiva (September 05, 2009, 09:04 AM)
--- End quote ---

Hey jgpaiva,i run linux (though i'm a noob still)...how difficult is this to make this?With SED?Does it need some further knowledge...and skills of course?

jgpaiva:
It's quite easy.. Just open a console in the folder where you have your files, and type the following command:

--- ---cat *.txt | sed "s/\s\+/,/g" > output.outThat'll read all the txts in the folder, pass them to sed, which then replaces consecutive blank spaces with a comma, and then outputs the result of this command to a file named output.out.

It still does not fix the problem with the different encodings, but it might be a first step in the right direction.


ps: DON'T name the output with the .txt extension, or it'll be read by the script and it'll enter an infinite loop :)

jgpaiva:
By closely observing the data, I can see you have files with different number of columns.. That'll make the problem even more difficult. Which column exactly do you want to sum?

rjbull:
In linux, I'd use SED to replace the tabs with spaces. I don't know of any similar tool in windows, though
-jgpaiva (September 05, 2009, 09:04 AM)
--- End quote ---
jgpaiva, was that a grammatical error?  Surely you know there are Windows ports of SED? Alternatively,
freeware WinGUI search-and-replace apps include BKReplacem and HandyFile Find and Replace (HFFR) last free version.

jgpaiva:
Actually, I didn't know there are ports of sed for windows (except for cygwin, which is a giant nuisance).
Thanks for the info, rjbull!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version