Combine Files

Features wanted...
Post Reply
hieubm
Posts: 8
Joined: 29 Dec 2009 02:20

Combine Files

Post by hieubm »

I have files like: XYZ.iso.001, XYZ.iso.002,...
and I want to combine these files into only single file. But XYplorer doesn't support this feature.

It's very good if this feature appears in the next version.

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: Combine Files

Post by j_c_hallgren »

hieubm wrote:I have files like: XYZ.iso.001, XYZ.iso.002,...
and I want to combine these files into only single file. But XYplorer doesn't support this feature.

It's very good if this feature appears in the next version.
You are correct in that XY doesn't support it and I really doubt it will...and by the way, asking for a given feature in "next version" isn't the best way to phrase your request here...Don will add features if and when he wants which might be soon or much later...

Having said that, I found this older thread where there is a script by serendipity that may help with this...see http://www.xyplorer.com/xyfc/viewtopic. ... 967#p34967
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

hieubm
Posts: 8
Joined: 29 Dec 2009 02:20

Re: Combine Files

Post by hieubm »

Sorry, but I searched.
I searched "combine files", I searched "join files", ...
I searched by XYplorer search engine, I searched by Google..
But I didn't find anything, and then...I posted.

Scripts is powerful, but it's not for general users. And I hope XYplorer will has a command to do this (in File menu and right-click menu). And until now, it is not a given feature.

Hope Don will add it soon.

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: Combine Files

Post by j_c_hallgren »

hieubm wrote:Sorry, but I searched.
I searched "combine files", I searched "join files", ...
I searched by XYplorer search engine, I searched by Google..
But I didn't find anything, and then...I posted.
I appreciate that you attempted to locate it first as often people don't...and I used the same forum search "join files" but also looked for "001 002" which helped...
Scripts is powerful, but it's not for general users.
You didn't specify which vers you were using so if it's the Home Edition then scripting isn't available unfortunately...and while writing scripts may not be for everyone, anyone can make use of a script from others (presuming you have the Pro Edition)...
And I hope XYplorer will has a command to do this (in File menu and right-click menu). And until now, it is not a given feature. Hope Don will add it soon.
Given that this type of split files isn't nearly as common these days as it was years ago, and his comment in the other thread, I wouldn't be too hopeful, especially since there are other ways to accomplish this function...but I'd see what Don says himself.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

hieubm
Posts: 8
Joined: 29 Dec 2009 02:20

Re: Combine Files

Post by hieubm »

You didn't specify which vers you were using so if it's the Home Edition then scripting isn't available unfortunately...and while writing scripts may not be for everyone, anyone can make use of a script from others (presuming you have the Pro Edition)...
I'm using the Pro Edition. The word "general users" I said means non-IT users. And I want XYplorer be easier for everyone.

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: Combine Files

Post by j_c_hallgren »

hieubm wrote:I'm using the Pro Edition. The word "general users" I said means non-IT users. And I want XYplorer be easier for everyone.
Good! That means you can make use of Scripts! And by doing so, you can extend the capabilities of XY in areas that Don may not wish to bother with or in custom areas unique to your needs...there are quite a few scripts already written and also users in forum who can assist in creating or tweaking them...they may not solve every situation but can handle a great nbr of them.

So that makes it easier for almost everyone...easier for Don to code & maintain just the scripting language...easier for users who don't have to wait on or rely on him to code a feature into XY...a win for both sides.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

admin
Site Admin
Posts: 65185
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Combine Files

Post by admin »

AFAIK this is the first request I ever got for joining files. I know that other file managers offer split and join, but these are features from the 90s that just survive as rudiments (I thought).

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: Combine Files

Post by j_c_hallgren »

admin wrote:AFAIK this is the first request I ever got for joining files. I know that other file managers offer split and join, but these are features from the 90s that just survive as rudiments (I thought).
In the thread that I mentioned with the script from last July http://www.xyplorer.com/xyfc/viewtopic.php?f=3&t=3802, it's listed as item #4 by the OP
4) I know other software can do this, but would it be possible to add a "join" fx for ".001" files and "join & delete files" to join the .001 files then move the original .001, .002, etc.. to recycle bin. There's NO program as of 7/2/09 that can do this. They can join, but not delete the remaining files. I currently use 7Zip to join the files, but then have to manually delete the .00* files. It's a major PITA.
...ok, so that also requested a "join & delete" but it did request a "join"...though admittedly you didn't participate in that thread.

But it was somewhat also referred to (a bit indirectly maybe) about a month ago in http://www.xyplorer.com/xyfc/viewtopic.php?f=2&t=4516 where you did post twice...and your
admin wrote:I'd say this is too weird to be supported.
was the basis for me to wonder if you would support the "join" and thus reply as I did above here.

I know I can't keep track of everything so I don't expect you to! 8)
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

admin
Site Admin
Posts: 65185
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Combine Files

Post by admin »

j_c_hallgren wrote:
admin wrote:AFAIK this is the first request I ever got for joining files. I know that other file managers offer split and join, but these are features from the 90s that just survive as rudiments (I thought).
In the thread that I mentioned with the script from last July http://www.xyplorer.com/xyfc/viewtopic.php?f=3&t=3802, it's listed as item #4 by the OP
4) I know other software can do this, but would it be possible to add a "join" fx for ".001" files and "join & delete files" to join the .001 files then move the original .001, .002, etc.. to recycle bin. There's NO program as of 7/2/09 that can do this. They can join, but not delete the remaining files. I currently use 7Zip to join the files, but then have to manually delete the .00* files. It's a major PITA.
...ok, so that also requested a "join & delete" but it did request a "join"...though admittedly you didn't participate in that thread.

But it was somewhat also referred to (a bit indirectly maybe) about a month ago in http://www.xyplorer.com/xyfc/viewtopic.php?f=2&t=4516 where you did post twice...and your
admin wrote:I'd say this is too weird to be supported.
was the basis for me to wonder if you would support the "join" and thus reply as I did above here.

I know I can't keep track of everything so I don't expect you to! 8)
Ok ok, I should sometimes even click on your links... :oops:

wogone
Posts: 3
Joined: 10 Jul 2007 22:36

Re: Combine Files

Post by wogone »

Hi!

I'm glad I have found other people wanting to use XYplorer scripting to join several files together. I wanted a more general script that will combine any files - regardless of whether their extension is .001 .002 or whatever.

I have modified the code in the old thread that was linked to and got this more generic code:

Code: Select all

//Get info for deleting files later
  $delete= getinfo ("SelectedItemsPathNames", "|");
//Get info of file paths
  $files= getinfo ("SelectedItemsPathNames", "+");
//remove path and retain names
   replace $files, $files, "<curpath>\","";
//find first instance of +
  strpos $select, $files, "+";
//extract file name
  substr $name, $files, 0, $select; 
//run from command prompt
  run "cmd /c copy/b $files Joined_$name";
// You have the option to delete /and recycle. 
  delete 1,1, $delete;
I have two issues:
1) It won't work with files containing a space in the name, as the $files need to be wrapped in "" quotes. Any ideas how I do this with replace?
2) It would be nice if the file browser window updated itself before showing the popup asking if you want to delete the source files... That way you can be sure that your joined file has been produced!

Any help would be greatly appreciated!

And finally (forgive me for not conducting a big search of the website) - is there a repository of XYplorer scripts? I'd like to browse through other people's offerings.. but it's rather hard finding them in amongst forum posts.

highend
Posts: 14622
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Combine Files

Post by highend »

Code: Select all

  $files = get("SelectedItemsPathNames", "|");
  $firstFile = getpathcomponent(gettoken($files, 1, "|"), "file");
  $quotedFiles = quote(replace($files, "|", '" + "'));
  run "cmd /c copy /b $quotedFiles ""<curpath>\Joined_$firstFile""", , 2, 1;
  #485; // Refresh current list
  delete 1, 1, $files;
Something like this?
Last edited by highend on 10 May 2013 22:01, edited 1 time in total.
One of my scripts helped you out? Please donate via Paypal

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Combine Files

Post by Stefan »

Or like that

Code: Select all

 //Store full path to origin files to delete them later:
   $delete = getinfo ("SelectedItemsPathNames", "|");
   
 //Get names only of selected files in quotes:
   $files  =  chr(34) . getinfo("SelectedItemsNames", """+""") . chr(34);
 //Prompt user and ask to continue:
   $join   = confirm( "Join this files now?<crlf 2>$files" );
   end($join==0), "Cancelled by user.";
    
 //Get first file name to reuse for combined file:
   $name   = gettoken( $files, 1, "+");
   $name   = replace( $name , '"','');
   $name   = "Joined_$name";
   $name   = input("Combine as", "New name for combined files:",$name);
   $nameQ  = quote($name);
 //Prompt user and ask to continue:
   msg "We gonna join selected files as: $nameQ",1;
    
 //Run from command prompt
   run "cmd /c copy/b $files $nameQ";
   
    
 //Delete origin files routine:
    //Only if combined file exists:
    if( exists("<curpath>\$name")==1 ){
       //Prompt user and ask to continue:
       $del = confirm( "Delete now this files?<crlf 2>" . replace($delete,"|","<crlf>") );
       If($del==1){ 
            msg "Ok, we delete now";
            // You have the option to delete /and recycle.
            //  delete 1,1, $delete;
       }else{
           msg "Fine, we keep original files too.";
       }
    }

That remind me on at least one another way (for text files) over there >> Text-merging Tool


.

Post Reply