Re: Combining files
by Utilitarian (Vicar) on Oct 02, 2009 at 11:19 UTC
|
This is a basic OS task, even Dos can do it
c:\DoS> type * >..\newFile | [reply] [d/l] |
A reply falls below the community's threshold of quality. You may see it by logging in. |
A reply falls below the community's threshold of quality. You may see it by logging in. |
A reply falls below the community's threshold of quality. You may see it by logging in. |
Re: Combining files
by desemondo (Hermit) on Oct 02, 2009 at 11:34 UTC
|
Actually, you might not even need Perl for that one.
To "join" some files (appended one after another) try the following:
copy test1.txt +test2.txt +test3.txt test_appended.txt
More info copy /?
... To append files, specify a single file for destination, but multip
+le files
for source (using wildcards or file1+file2+file3 format).
Update:
Utilitarian's way would work too - however it might be a tad slower... (unlikey to make any real difference though) | [reply] [d/l] [select] |
Re: Combining files
by marto (Cardinal) on Oct 02, 2009 at 11:13 UTC
|
Given your recent comment one one liners is this wise? What have you tried so far? Your options are learn how to do this using your OS, or learn how to do it using Perl. As previously stated this site isn't rentacoder.com. All of the resources you need have been pointed out to you, many times.
| [reply] |
Re: Combining files
by Anonymous Monk on Oct 02, 2009 at 11:11 UTC
|
I am operating in a Windoze environment.
Install cat program, they have for windows | [reply] |
Re: Combining files
by planetscape (Chancellor) on Oct 02, 2009 at 13:09 UTC
|
| [reply] [d/l] |
Re: Combining files
by Anonymous Monk on Oct 02, 2009 at 11:15 UTC
|
| [reply] |
Re: Combining files
by Not_a_Number (Prior) on Oct 02, 2009 at 18:53 UTC
|
Well done everybody!
Our friend has got his reply (in fact, several replies that work), and he'll be happy: he didn't have to do any of the things he never bothers to (such as reading docs or googling..).
OK, he reaped a few insults along the way, and lost more XP, but he doesn't care. You've once again allowed yourselves to be manipulated by him {sigh!} and served him up his answer on a platter!
| [reply] |
|
Actually, I sometimes enjoy this kind of thread, as even a do-my-homework question might unintentionally touch on a few interesting points within Perl.And if a thread happens to wander in that direction, it suddenly might show a few gems and interesting viewpoints from other monks. Sometimes an obvious, too-simple, naive or absurd opening question is required for this (zen) event to happen.
Kind of thread-hijacking. But I think the opening monk has to allow for hijacking when asking this kind of question. The potential for such gems (and me learning something interesting) IMHO more than outweighs both the harm to the community by a potential homework-troll and the harm to the potential homework-trolls skill level. Kind of an evil point of view :)
This time it was not so much learning but really fun to find out about a module successor to that unix tool rewrite in perl project (PPT, was it?). And that DOS copy + trick might prove useful to me one day.
Paraphrase: I care about us and knowledge, but not necessarily about the opener.
cu
Peter
PS: Just stumbled upon Stupid stumpers and good questions from just before I joined. This thread raises similar points and also reflects on hidden gems inspite of or rather due to a monk's annyoance about openers and answers. What's that saying: On the Internet, it's always September. And September ended last week.
PS2: Stumbled on fellow monk audreyt's troll hugging report (probably best described as unsuspecting troll meats border collie - nice :))
| [reply] |
Re: Combining files
by ikegami (Patriarch) on Oct 02, 2009 at 14:49 UTC
|
copy /b a+b+c d
Wild cards are ok:
copy /b *.* d
| [reply] [d/l] [select] |
Re: Combining files
by BrowserUk (Patriarch) on Oct 03, 2009 at 00:14 UTC
|
| [reply] |
|
Not sure what Win's task is, but in my case, Due to a system upgrade at work, our log files got cut twice a day instead of once.
Using the appending feature of copy was literally a 2 second fix to make the report look the same...
| [reply] [d/l] |
|
copy log1+log2 log
The thing that has me intrigued is Wins
combine all files in a folder, stacked one on top of another in a single file?
Especially if there is any possibility of any binary files in that folder.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] |