Joining two (or more) files
-
- Posts: 131
- Joined: 28 Feb 2015 19:42
Joining two (or more) files
Using XYplorer is there a simple way to join (concatenate) several ASCII files? Intuition is that it can be accomplished with Paste but can not get it to work right. Maybe need a script?
Re: Joining two (or more) files
Code: Select all
$content = "";
foreach($item, get("SelectedItemsPathNames", <crlf>), <crlf>, "e") {
if (strpos(get("genericfiletype", "{:Text}"), "." . gpc($item, "ext")) != -1 && exists($item) == 1) {
$content = $content . (($content) ? <crlf 3> . readfile($item) : readfile($item));
}
}
if ($content) { writefile("<curpath>\joined_files.txt", $content); }
One of my scripts helped you out? Please donate via Paypal
-
- Posts: 131
- Joined: 28 Feb 2015 19:42
Re: Joining two (or more) files
To Highend - Thank you for assembling the code to concatenate files. Not only was it not simple but it didn't even use Paste function. Shows what little I know.
Re: Joining two (or more) files
Took 2 minutes, wouldn't call it complicated
One of my scripts helped you out? Please donate via Paypal