Author Topic: change paths synchronously on both sides  (Read 12791 times)

mario_lorenz

  • Newbie
  • *
  • Posts: 2
    • View Profile
change paths synchronously on both sides
« on: May 26, 2013, 09:31:32 »
Hi Forum,

what I need is to change the paths on both sides in sync. I need this the feature e.g. for an FTP comparison.

Is it possible?

Regards,

Mario

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4386
    • View Profile
    • Multi Commander
Re: change paths synchronously on both sides
« Reply #1 on: May 26, 2013, 12:49:38 »
I'm planing something that.  However it is not as easy as one might think because a lot of things can go wrong and the question is how to handle that..

However... right now you can do it using Multi-Script..

Code: [Select]
@var $foldername = GetSourceFocusName();

@var $srcPath = GetSourcePath();
@var $trgPath = GetTargetPath();

$srcPath = $srcPath ^ $foldername;
$trgPath = $trgPath ^ $foldername;

MC.Explorer.Goto SOURCE={$srcPath} TARGET={$trgPath}
Then assign that command to a shortcut key. and if you are standing on a folder named "My Folder" in the source view. and run the command it will try to enter a "My Folder" folder in both the target and source panel.



Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4386
    • View Profile
    • Multi Commander
Re: change paths synchronously on both sides
« Reply #2 on: May 26, 2013, 12:54:54 »
If you want to make sure that both the source and target folder both exists before it tries to enter it you do

Quote
@var $foldername = GetSourceFocusName();

@var $srcPath = GetSourcePath();
@var $trgPath = GetTargetPath();

$srcPath = $srcPath ^ $foldername;
$trgPath = $trgPath ^ $foldername;

if( IsFolder( $srcPath ) )
{
  if(IsFolder( $trgPath) )
  {
    MC.Explorer.Goto SOURCE={$srcPath} TARGET={$trgPath}
  }
}


mario_lorenz

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: change paths synchronously on both sides
« Reply #3 on: May 26, 2013, 14:28:10 »
Thanks a lot! The script and the hotkey works well.

I found and use this feature in Filezilla. There you can press a button and all directory changes on the one hand be run simultaneously on the other side. Whether by keyboard or mouse. If you´ll enter a directory that not exist on the other side, filezilla ask you to unlock the button. Thats a very nice feature for directory comparison with your eyes.

Maybe you will set this feature in a future release.

Greatings, Mario