Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - pncdaspropagandas

Pages: [1] 2
1
Support and Feedback / Find in MultiDataViewer
« on: December 08, 2017, 14:45:26 »
- Open .\Config\TOTD\totd.xml in MultiDataViewer
- Find "calc"
- The 1st occurence will be on the far right of the line
- Now find next
- The 2nd occurence will be on the beggining of the line, but the slider doen't go back to the left

2
Feature Requests and Suggestions / Create Links
« on: December 06, 2017, 18:44:24 »
I regularly use the Create Link to File/Folder wizard. On most cases I use Hardlink. The next time I open the wizard, it resets the link type to Junction. I would like MC to remember the last link type chosen. That would save me the work to change it again.

Thanks.

3
Support and Feedback / Select files
« on: September 25, 2017, 15:29:00 »
Hi,

I'm having some problems selecting files as here http://forum.multicommander.com/forum/index.php/topic,1931.0.html

Another way of reproducing the problem is:

- Use Windows Explorer Look and feel
- Enter a subfolder
- Press BACKSPACE to go back
- Press END
- Press SHIFT+UP

Expected: select 2 last files
Result: select from first file to second last

Can you please check it? I imagine it is a easy fix maybe
Thanks

4
Script / Create folder and move selected files
« on: September 18, 2017, 18:43:23 »
Hi, I tried to write a script to do 2 operations at once:
- Create a subfolder
- Move the selected files to that subfolder

So I wrote:
Code: [Select]
// Ask user for folder name
@var $answer = AskText("Type name of the new folder to create and move selected files.", "New folder", 0);

// If user canceled, abort
if ( $answer == 0 )
{
break;
}

// Folder exists?
@var $source_path = GetSourcePath();
if( FileExists($source_path ^ $answer) > 0 )
{
MessageBox("Error", "Typed folder already exists.", 0);
break;
}
else
{
// Create empty folder
// Check if source path is LOCAL
@var $options;
if( IsFolder($source_path) )
{
@var $colon_check = StrSub($source_path, 1, 1);
if( StrIsEqual($colon_check, ":") )
{
$options = "LOCAL,RECURSIVE";
}
else
{
$options = "";
}
}
else
{
$options = "";
}

if( MakeDir($source_path ^ $answer, $options) == 0 )
{
Log( 1, 10, "Created : " + $source_path ^$answer );
@var $selected_files = GetSourceSelectedPaths();
@var $n;
@var $len = StrLen($answer) - 1;
@var $slash = StrSub($answer, $len, 1);
if( StrIsEqual($slash, "\\") )
{
$slash = "";
}
else
{
$slash = "\\";
}
for( $n=0; $n<arrayCount($selected_files); $n++ )
{
// MoveFile has a bug where target path has to end with slash
if( $n == 0 )
{
MoveFile($source_path ^ $answer + $slash, $selected_files[$n], "NODIALOG,NEWQUEUE");
}
else
{
MoveFile($source_path ^ $answer + $slash, $selected_files[$n], "NODIALOG,USEEXISTINGQUEUE");
}
}

// Select created folder
// SetClipboardText($source_path ^ $answer);
// MC.RunCmd ID="Core.1312"
// MC.Explorer.Selection.UnselectAll
}
else
{
MessageBox("Error", "Error while creating folder.", 0);
break;
}
}

but when I have a lot of files selected, MC hangs while executing the MoveFile()..... I don't know if I did something wrong. Do I have indeed to move each file individualy inside a for?

5
User Contributed Content / Create an empty file
« on: September 06, 2017, 15:43:51 »
This scripts creates an empty file (if provided name is not already a file) and defaults to .txt if extension is not typed. Selects the file after that.

Code: [Select]
// Ask user for file name
@var $answer = AskText("Enter file name", "New file.txt", 0);

// If user canceled, abort
if ( $answer == 0 )
{
break;
}

// Full path name
@var $file_name = GetSourcePath() ^ $answer;

// If answer doesn't have any extension, default to .txt
@var $ext_size = StrLen( PathGetFileExtPart($file_name) );
if ($ext_size == 0)
{
$file_name = $file_name + ".txt";
}

// File exists?
if (FileExists($file_name) > 0)
{
MessageBox("Error", "File already exists", 0);
}
else
{
// Create empty file
SaveStringToFile($file_name, "", 0);

// It's not possible to select the created file because the script doesn't recognize new items until the script ends. Only when it finishes is that new items are available and refreshed.
// But found a way using native CTRL+V feature
SetClipboardText($file_name);
    MC.Explorer.Selection.UnselectAll
    MC.RunCmd ID="Core.1312"
}

6
I made rules for formatting html files in MultiDataViewer.

It's not perfect, but it's fine. Maybe someone could improve it.

Add the following to you "mcinstallpath\Extensions\MultiFileViewer\ColorFormatting.xml" file. Backup first if you like.

  <profile name="HTML" id="0596a19914574936a2e34f16fe87d476" ext="htm,html">
    <format themecolor="0" textcolor="#0000ff" backgroundcolor="-1" flags="256">&lt;\w+</format>
    <format themecolor="0" textcolor="#0000ff" backgroundcolor="-1" flags="256">&lt;*([/]?&gt;)</format>
    <format themecolor="0" textcolor="#0000ff" backgroundcolor="-1" flags="256">&lt;/.*&gt;</format>
    <format themecolor="0" textcolor="#ff0000" backgroundcolor="-1" flags="256">\b(?:[Aa][Cc][Cc][Ee][Pp]|[Aa][Cc][Cc][Ee][Pp][-][Cc][Hh][Aa][Rr][Ss][Ee]|[Aa][Cc][Cc][Ee][Ss][Ss][Kk][Ee][Yy]|[Aa][Cc][Ii][Oo][Nn]|[Aa][Ll][Ii][Gg][Nn]|[Aa][Ll]|[Aa][Ss][Yy][Nn][Cc]|[Aa][Uu][Oo][Cc][Oo][Mm][Pp][Ll][Ee][Ee]|[Aa][Uu][Oo][Ff][Oo][Cc][Uu][Ss]|[Aa][Uu][Oo][Pp][Ll][Aa][Yy]|[Bb][Gg][Cc][Oo][Ll][Oo][Rr]|[Bb][Oo][Rr][Dd][Ee][Rr]|[Cc][Hh][Aa][Ll][Ll][Ee][Nn][Gg][Ee]|[Cc][Hh][Aa][Rr][Ss][Ee]|[Cc][Hh][Ee][Cc][Kk][Ee][Dd]|[Cc][Ii][Ee]|[Cc][Ll][Aa][Ss][Ss]|[Cc][Oo][Ll][Oo][Rr]|[Cc][Oo][Ll][Ss]|[Cc][Oo][Ll][Ss][Pp][Aa][Nn]|[Cc][Oo][Nn][Ee][Nn]|[Cc][Oo][Nn][Ee][Nn][Ee][Dd][Ii][Aa][Bb][Ll][Ee]|[Cc][Oo][Nn][Ee][Xx][Mm][Ee][Nn][Uu]|[Cc][Oo][Nn][Rr][Oo][Ll][Ss]|[Cc][Oo][Oo][Rr][Dd][Ss]|[Dd][Aa][Aa]|[Dd][Aa][Aa][-][\*]|[Dd][Aa][Ee][Ii][Mm][Ee]|[Dd][Ee][Ff][Aa][Uu][Ll]|[Dd][Ee][Ff][Ee][Rr]|[Dd][Ii][Rr]|[Dd][Ii][Rr][Nn][Aa][Mm][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ee][Ll][Ee][Cc][Ee][Dd]|[Ss][Hh][Aa][Pp][Ee]|[Ss][Ii][Zz][Ee]|[Ss][Ii][Zz][Ee][Ss]|[Ss][Pp][Aa][Nn]|[Ss][Pp][Ee][Ll][Ll][Cc][Hh][Ee][Cc][Kk]|[Ss][Rr][Cc]|[Ss][Rr][Cc][Dd][Oo][Cc]|[Ss][Rr][Cc][Ll][Aa][Nn][Gg]|[Ss][Rr][Cc][Ss][Ee]|[Ss][Aa][Rr]|[Ss][Ee][Pp]|[Ss][Yy][Ll][Ee]|[Aa][Bb][Ii][Nn][Dd][Ee][Xx]|[Aa][Rr][Gg][Ee]|[Ii][Ll][Ee]|[Rr][Aa][Nn][Ss][Ll][Aa][Ee]|[Yy][Pp][Ee]|[Uu][Ss][Ee][Mm][Aa][Pp]|[Vv][Aa][Ll][Uu][Ee]|[Ww][Ii][Dd][Hh]|[Ww][Rr][Aa][Pp]|)=</format>
    <format themecolor="0" textcolor="#8000ff" backgroundcolor="-1" flags="256">".*?"</format>
    <format themecolor="0" textcolor="#8000ff" backgroundcolor="-1" flags="256">'.*?'</format>
    <format themecolor="0" textcolor="#008000" backgroundcolor="-1" flags="256">&lt;!--.*--&gt;</format>
  </profile>

7
User Contributed Content / Work with a target path
« on: September 05, 2017, 18:20:02 »
If you have to move/copy files from various places to a specific folder, or if you are going to do a lot of fractioned operations, here is some cool scripts:

Define a target folder/path:
Code: [Select]
@var $target_path = GetSourcePath();
@var $target_path_temp_file = ".\\Config\\UserDefinedScripts\\File Ops\\target_path.txt";
SaveStringToFile($target_path_temp_file, $target_path, 0);
MessageBox("Target defined", $target_path, 0);

Show a MessageBox with stored folder:
Code: [Select]
@var $target_path_temp_file = ".\\Config\\UserDefinedScripts\\File Ops\\target_path.txt";
if( !(FileExists($target_path_temp_file)) )
{
MessageBox( "Show Target", "No target path defined yet.", 0);
break;
}
@var $target_path = LoadStringFromFile($target_path_temp_file);
MessageBox("Show Target", $target_path, 0);

Go To target Folder:
Code: [Select]
@var $target_path_temp_file = ".\\Config\\UserDefinedScripts\\File Ops\\target_path.txt";
if( !(FileExists($target_path_temp_file)) )
{
MessageBox( "Show Target", "No target path defined yet.", 0);
break;
}
@var $target_path = LoadStringFromFile($target_path_temp_file);
MC.Explorer.Goto SOURCE={$target_path}

Copy Selected File/Folders to Target:
Code: [Select]
//
//
// For some reason, when using USEEXISTINGQUEUE, it fails to OVERWRITE, so I always use NEWQUEUE
//
//

@var $target_path_temp_file = ".\\Config\\UserDefinedScripts\\File Ops\\target_path.txt";
if( !(FileExists($target_path_temp_file)) )
{
MessageBox( "Copy to Target", "No target path defined yet.", 0);
break;
}
@var $target_path = LoadStringFromFile($target_path_temp_file);

@var $arr_selected_items[] = GetSourceSelectedPaths();

@var $n;
@var $options = {"Overwrite", "Overwrite All", "Ignore", "Abort"};
@var $user_option = -2;
@var $n_file;
if( arrayCount($arr_selected_items) >= 1 )
{
for ($n=0; $n < arrayCount($arr_selected_items); $n++)
{
// Overwrite All
if( $user_option == 1 )
{
if ( IsFolder($arr_selected_items[$n]) )
{
// Add / to source path
CopyFile($target_path, $arr_selected_items[$n] + "\\", "NODIALOG, NOPROGRESS, OVERWRITE_ALL, NEWQUEUE");
}
else
{
CopyFile($target_path, $arr_selected_items[$n], "NODIALOG, NOPROGRESS, OVERWRITE_ALL, NEWQUEUE");
}
//CopyFileMLR($target_path, $arr_selected_items[$n], $n);
}
else
{
$n_file = PathGetNamePart($arr_selected_items[$n], 0);
if( FileExists($target_path ^ $n_file) )
{
$user_option = AskOption('File/Folder "' + $n_file + '" already exists on target.', $options, 0);
if( $user_option == 0 )
{
// Overwrite
if ( IsFolder($arr_selected_items[$n]) )
{
// Add / to source path
CopyFile($target_path, $arr_selected_items[$n] + "\\", "NODIALOG, NOPROGRESS, OVERWRITE_ALL, NEWQUEUE");
}
else
{
CopyFile($target_path, $arr_selected_items[$n], "NODIALOG, NOPROGRESS, OVERWRITE_ALL, NEWQUEUE");
}
//CopyFileMLR($target_path, $arr_selected_items[$n], $n);
}
else if( $user_option == 1 )
{
// Overwrite All
if ( IsFolder($arr_selected_items[$n]) )
{
// Add / to source path
CopyFile($target_path, $arr_selected_items[$n] + "\\", "NODIALOG, NOPROGRESS, OVERWRITE_ALL, NEWQUEUE");
}
else
{
CopyFile($target_path, $arr_selected_items[$n], "NODIALOG, NOPROGRESS, OVERWRITE_ALL, NEWQUEUE");
}
//CopyFileMLR($target_path, $arr_selected_items[$n], $n);
}
else if( $user_option == 3 )
{
// Abort
$n = arrayCount($arr_selected_items) + 1;
}
}
else
{
if ( IsFolder($arr_selected_items[$n]) )
{
// Add / to source path
CopyFile($target_path, $arr_selected_items[$n] + "\\", "NODIALOG, NOPROGRESS, OVERWRITE_ALL, NEWQUEUE");
}
else
{
CopyFile($target_path, $arr_selected_items[$n], "NODIALOG, NOPROGRESS, OVERWRITE_ALL, NEWQUEUE");
}
//CopyFileMLR($target_path, $arr_selected_items[$n], $n);
}
}
}
}

Move File/Folders to Target:
Code: [Select]
//
//
// For some reason, when using USEEXISTINGQUEUE, it fails to OVERWRITE, so I always use NEWQUEUE
//
//

@var $target_path_temp_file = ".\\Config\\UserDefinedScripts\\File Ops\\target_path.txt";
if( !(FileExists($target_path_temp_file)) )
{
MessageBox( "Copy to Target", "No target path defined yet.", 0);
break;
}
@var $target_path = LoadStringFromFile($target_path_temp_file);

@var $arr_selected_items[] = GetSourceSelectedPaths();

@var $n;
@var $options = {"Overwrite", "Overwrite All", "Ignore", "Abort"};
@var $user_option = -2;
@var $n_file;
if( arrayCount($arr_selected_items) >= 1 )
{
for ($n=0; $n < arrayCount($arr_selected_items); $n++)
{
// Overwrite All
if( $user_option == 1 )
{
if ( IsFolder($arr_selected_items[$n]) )
{
// Add / to source path
MoveFile($target_path, $arr_selected_items[$n] + "\\", "NODIALOG, NOPROGRESS, OVERWRITE_ALL, NEWQUEUE");
}
else
{
MoveFile($target_path, $arr_selected_items[$n], "NODIALOG, NOPROGRESS, OVERWRITE_ALL, NEWQUEUE");
}
//MoveFileMLR($target_path, $arr_selected_items[$n], $n);
}
else
{
$n_file = PathGetNamePart($arr_selected_items[$n], 0);
if( FileExists($target_path ^ $n_file) )
{
$user_option = AskOption('File/Folder "' + $n_file + '" already exists on target.', $options, 0);
if( $user_option == 0 )
{
// Overwrite
if ( IsFolder($arr_selected_items[$n]) )
{
// Add / to source path
MoveFile($target_path, $arr_selected_items[$n] + "\\", "NODIALOG, NOPROGRESS, OVERWRITE_ALL, NEWQUEUE");
}
else
{
MoveFile($target_path, $arr_selected_items[$n], "NODIALOG, NOPROGRESS, OVERWRITE_ALL, NEWQUEUE");
}
//MoveFileMLR($target_path, $arr_selected_items[$n], $n);
}
else if( $user_option == 1 )
{
// Overwrite All
if ( IsFolder($arr_selected_items[$n]) )
{
// Add / to source path
MoveFile($target_path, $arr_selected_items[$n] + "\\", "NODIALOG, NOPROGRESS, OVERWRITE_ALL, NEWQUEUE");
}
else
{
MoveFile($target_path, $arr_selected_items[$n], "NODIALOG, NOPROGRESS, OVERWRITE_ALL, NEWQUEUE");
}
//MoveFileMLR($target_path, $arr_selected_items[$n], $n);
}
else if( $user_option == 3 )
{
// Abort
$n = arrayCount($arr_selected_items) + 1;
}
}
else
{
if ( IsFolder($arr_selected_items[$n]) )
{
// Add / to source path
MoveFile($target_path, $arr_selected_items[$n] + "\\", "NODIALOG, NOPROGRESS, OVERWRITE_ALL, NEWQUEUE");
}
else
{
MoveFile($target_path, $arr_selected_items[$n], "NODIALOG, NOPROGRESS, OVERWRITE_ALL, NEWQUEUE");
}
//MoveFileMLR($target_path, $arr_selected_items[$n], $n);
}
}
}
}

8
User Contributed Content / MultiDataViewer - SH Color syntax formatting
« on: September 04, 2017, 14:38:48 »
I made rules for formatting linux sh files in MultiDataViewer.

It's not perfect, but it's fine. Maybe someone could improve it.

Add the following to you "mcinstallpath\Extensions\MultiFileViewer\ColorFormatting.xml" file. Backup first if you like.

  <profile name="SH" id="334b5e34f49246d8af418b2db717562b" ext="sh">
    <format themecolor="0" textcolor="#008080" backgroundcolor="#00ffff" flags="256">\$\{([^\s]+)</format>
    <format themecolor="0" textcolor="#808080" backgroundcolor="-1" flags="256">"\$(\w+)</format>
    <format themecolor="0" textcolor="#ff8040" backgroundcolor="#ffffd9" flags="256">\$(\w+)</format>
    <format themecolor="0" textcolor="#0000ff" backgroundcolor="-1" flags="256">\b(?:[Cc][Aa][Ss][Ee]|[Dd][Oo]|[Dd][Oo][Nn][Ee]|[Ee][Ll][Ii][Ff]|[Ee][Ll][Ss][Ee]|[Ee][Ss][Aa][Cc]|[Ff][Ii]|[Ff][Oo][Rr]|[Ff][Uu][Nn][Cc][Ii][Oo][Nn]|[Ii][Ff]|[Ii][Nn]|[Ss][Ee][Ll][Ee][Cc]|[Hh][Ee][Nn]|[Uu][Nn][Ii][Ll]|[Ww][Hh][Ii][Ll][Ee]|[Ii][Mm][Ee])\b</format>
    <format themecolor="0" textcolor="#0000ff" backgroundcolor="-1" flags="256">\b(?:[Cc][Dd]|[Ee][Cc][Hh][Oo])\b</format>
    <format themecolor="0" textcolor="#804040" backgroundcolor="#e1fff3" flags="256">`(?:[^"\\]|\\.)*?`</format>
    <format themecolor="0" textcolor="#808080" backgroundcolor="-1" flags="256">"(?:[^"\\]|\\.)*?"</format>
    <format themecolor="0" textcolor="#ff0000" backgroundcolor="-1" flags="256">\b[0-9]+</format>
    <format themecolor="0" textcolor="#804000" backgroundcolor="-1" flags="256">(?:\[|\(|\]|\)|=|\||;|!|\/|-|&lt;|&gt;)</format>
    <format themecolor="0" textcolor="#804000" backgroundcolor="-1" flags="2">{,},{}</format>
    <format themecolor="0" textcolor="#008000" backgroundcolor="-1" flags="4352">^#</format>
  </profile>

9
User Contributed Content / MultiDataViewer - BAT Color syntax formatting
« on: September 04, 2017, 14:38:06 »
I made rules for formatting bat files in MultiDataViewer.

It's not perfect, but it's fine. Maybe someone could improve it.

Add the following to you "mcinstallpath\Extensions\MultiFileViewer\ColorFormatting.xml" file. Backup first if you like.

  <profile name="BAT" id="b89ce93014ba4389a6e1a76981a0984f" ext="bat">
    <format themecolor="0" textcolor="#008000" backgroundcolor="-1" flags="2">rem</format>
    <format themecolor="0" textcolor="#0080ff" backgroundcolor="-1" flags="256">^\w+</format>
    <format themecolor="0" textcolor="#0000ff" backgroundcolor="-1" flags="256">^\s*\t*\b(?:[Aa][Ss][Ss][Oo][Cc]|[Bb][Rr][Ee][Aa][Kk]|[Cc][Aa][Ll][Ll]|[Cc][Hh][Cc][Pp]|[Cc][Hh][Dd][Ii][Rr]|[Cc][Dd]|[Cc][Ll][Ss]|[Cc][Oo][Ll][Oo][Rr]|[Cc][Oo][Pp][Yy]|[Dd][Aa][Ee]|[Ee][Cc][Hh][Oo]|[Ee][Nn][Dd][Ll][Oo][Cc][Aa][Ll]|[Ee][Xx][Ii]|[Ff][Oo][Rr]|[Ff][Yy][Pp][Ee]|[Gg][Oo][Oo]|[Ii][Ff]|[Mm][Kk][Dd][Ii][Rr]|[Mm][Oo][Vv][Ee]|[Pp][Aa][Hh]|[Pp][Aa][Uu][Ss][Ee]|[Pp][Oo][Pp][Dd]|[Pp][Rr][Oo][Mm][Pp]|[Pp][Uu][Ss][Hh][Dd]|[Rr][Ee][Nn][Aa][Mm][Ee]|[Rr][Mm][Dd][Ii][Rr][  ][Rr][Dd]|[Rr][Ee][Nn]|[Ss][Ee]|[Ss][Ee][Ll][Oo][Cc][Aa][Ll]|[Ss][Hh][Ii][Ff]|[Ss][Aa][Rr]|[Ii][Mm][Ee]|[Ii][Ll][Ee]|[Yy][Pp][Ee]|[Vv][Ee][Rr]|[Vv][Ee][Rr][Ii][Ff][Yy]|[Vv][Oo][Ll])\b</format>
    <format themecolor="0" textcolor="#0000ff" backgroundcolor="-1" flags="256">\b(?:[Gg][Oo][Oo]|[Ii][Ff]|[Ff][Oo][Rr]|[Dd][Oo]|[Ii][Nn]|[Ss][Ee])\b</format>
    <format themecolor="0" textcolor="#ff8040" backgroundcolor="#ffffd9" flags="256">%%\w+</format>
    <format themecolor="0" textcolor="#ff8040" backgroundcolor="#ffffd9" flags="256">%~?(\w+)</format>
    <format themecolor="0" textcolor="#ff8040" backgroundcolor="#ffffd9" flags="1">$%</format>
    <format themecolor="0" textcolor="#ff8000" backgroundcolor="#ffffd9" flags="256">!(?:[^"%\\]|\\.)*?!</format>
    <format themecolor="0" textcolor="#808080" backgroundcolor="-1" flags="256">"(?:[^"%\\]|\\.)*?"</format>
    <format themecolor="0" textcolor="#808080" backgroundcolor="-1" flags="1">"</format>
    <format themecolor="0" textcolor="#ff0000" backgroundcolor="-1" flags="16640">^\s*\t*:</format>
    <format themecolor="0" textcolor="#ff0080" backgroundcolor="-1" flags="4352">^@</format>
    <format themecolor="0" textcolor="#008000" backgroundcolor="-1" flags="4352">^::</format>
    <format themecolor="0" textcolor="#008000" backgroundcolor="-1" flags="4352">\b(?:[Rr][Ee][Mm])\b</format>
    <format themecolor="0" textcolor="#ff0000" backgroundcolor="-1" flags="1">|,*,&lt;,&gt;,=</format>
    <format themecolor="0" textcolor="#0080ff" backgroundcolor="-1" flags="1">(,)</format>
    <format themecolor="0" textcolor="#ff0000" backgroundcolor="-1" flags="256">\b[0-9]+</format>
  </profile>

10
Feature Requests and Suggestions / Move
« on: September 03, 2017, 19:40:22 »
It's just a minor detail, but to make the text accordingly to the file operation...

When moving files, the title text is correct, but the other descriptions say copied. Could be changed to moved.



Thanks

11
Support and Feedback / Multi Rename Focus
« on: August 26, 2017, 23:06:28 »
I noticed that when I have the focus on the right panel and use Multi Rename, after I close it, the focus always goes to the left panel. Is it simple to make it go back to the focused panel?

Thanks for the program. Can't stop using it. I replaced a lot of file managing programs with yours.

12
Is there a way to format commas in Color Syntax Formating. Since it is used as separator, I tried to escape with \, to use RegEx, but couldn't make it work. I want to format commas on CSV files.

Thanks

13
Script / Invert Selection
« on: August 24, 2017, 15:29:19 »
As discussed here
http://forum.multicommander.com/forum/index.php/topic,1168.msg3985.html#msg3985

When inverting with only 1 selected file/folder on Explorer Style, all files/folders get selected.

So I wrote a Script to fix it until MC does it automaticaly. And I remmaped the keyboard shortcut to run the Script, so in all cases I get the correct invert selection.

Code: [Select]
@var $selected_files = GetSourceSelectedFileNames();
MC.Explorer.Selection.InvertSelection
if( arrayCount($selected_files) == 1 )
{
MC.Explorer.Selection.Unselect FILTER={'"' + $selected_files[0] + '"'}
}

14
Support and Feedback / Load Selection From Clipboard
« on: August 19, 2017, 16:45:53 »
I noticed that if the file names on the clipboard have EOL (End Of Line) separator as CR it doesn't work well. I have to change it to CRLF to work. It doesn't bother me, but if it worked with CR as well it would be better.

Thanks!

15
Support and Feedback / Different results with delete options
« on: August 16, 2017, 16:35:39 »
Hi Mathias,

I was going to post here http://forum.multicommander.com/forum/index.php/topic,1434.msg5194.html#msg5194 but it wasn't enabled.

I have a similar problem and tried the following cenarios when trying to delete (pressing the del key) a non-empty folder on the network (with non-empty subfolders too):

1)
Core Settings > Filesystem > Ask confirmation before > deleting folders that are not empty (disabled)
Core Settings > Filesystem > Default file operations options > Delete > delete to recycle bin (enabled)
Core Settings > Filesystem > Default file operations options > Delete > delete all if possible (enabled)
Core Settings > Filesystem > Default file operations options > Delete > Tweaking > hide delete options  and confirmation windows (enabled)

Result: Warning Window: Folder is not empty! Cannot delete folder. Options: Skip, Skip All, Retry, Abort

So there is no way to delete this folder. I chose to hide the confirmation window and to don't need to confirm deletions on non empty folders.

2) Same as before but now I enabled
Core Settings > Filesystem > Ask confirmation before > deleting folders that are not empty (enabled)

I try to delete the folder and the Warning Window shows up again, but this time it shows also Delete and Delete All. I choose Delete and then another Warning Window shows up, but this time there are only the Skip, Skip All, Retry, Abort buttons...... If I choose Delete All the same happens....

So still couldn't delete the folder

3) Same as 2, but disabled recycle bin
Core Settings > Filesystem > Default file operations options > Delete > delete to recycle bin (disabled)

When I delete it, the "Delete Files" operation window that I chose not to show on the "hide delete options  and confirmation windows " option is ignored. Clicking on Yes we go back to the cenario 2 with options Delete, Delete All, Skip, Skip All, Retry, Abort, but this time, when I choose Delete it deletes the folder successfuly!

4) Whatever options, if I press SHIFT+DEL it deletes the folder


So I think the logic in managing the delete operation may need to be checked.


Thanks!

16
Script / Sync Panels Navigation
« on: August 12, 2017, 05:35:18 »
I made 4 scripts to navigate simultaneously on both panels.

It's not safe proof, but it satisfies my needs.

You can ENTER, GO TO PARENT FOLDER, GO SAME LEVEL UP, GO SAME LEVEL DOWN.

For practicity, I associated with keys CTRL + SHIFT + (ENTER / BACKSPACE / PAGE UP / PAGE DOWN)

ENTER script:
Code: [Select]
@var $source_focus_name = GetSourceFocusName();
@var $source_path = GetSourcePath();
@var $target_path = GetTargetPath();

MC.Explorer.Goto SOURCE={($source_path ^ $source_focus_name) + "\\"} TARGET={($target_path ^ $source_focus_name) + "\\"}

PARENT SCRIPT:
Code: [Select]
@var $source_path = GetSourcePath();
@var $source_parent_path;
@var $target_path = GetTargetPath();
@var $target_parent_path;

// Get the parent path
$source_parent_path = StrSub($source_path, 0, StrLen($source_path)-2);
$target_parent_path = StrSub($target_path, 0, StrLen($target_path)-2);

MC.Explorer.Goto SOURCE={$source_parent_path} TARGET={$target_parent_path}


PAGE DOWN Script:
Code: [Select]
@var $source_path = GetSourcePath();
@var $source_parent_path;
@var $target_path = GetTargetPath();
@var $target_parent_path;
@var $pos;
@var $n;
@var $source_next_folder_index = -1;
@var $target_next_folder_index = -1;
@var $arr_directories_source[];
@var $arr_directories_target[];

// Get the parent path
$source_path = StrSub($source_path, 0, StrLen($source_path)-1);
$pos = StrRFind($source_path, '\');
$source_parent_path = StrSub($source_path, 0, $pos);

$target_path = StrSub($target_path, 0, StrLen($target_path)-1);
$pos = StrRFind($target_path, '\');
$target_parent_path = StrSub($target_path, 0, $pos);

// Get files and folders on source parent
$arr_directories_source = FindFiles($source_parent_path ^ '*');
@var $source_path_index = -1;
for ($n=0; $n<arrayCount($arr_directories_source); $n++ )
{
if( StrIsEqual($arr_directories_source[$n], $source_path) )
{
$source_path_index =  $n;
break;
}
}
// Search folder down the array - Source
if( $source_path_index >= 0 )
{
for ($n=($source_path_index+1); $n<arrayCount($arr_directories_source); $n++ )
{
if( IsFolder($arr_directories_source[$n]) )
{
LogAppInfo($arr_directories_source[$n]);
$source_next_folder_index = $n;
break;
}
}
}

if( $source_next_folder_index > -1 )
{
// Get files and folders on target parent
$arr_directories_target = FindFiles($target_parent_path ^ '*');
// Search for same folder name
for ($n=0; $n<arrayCount($arr_directories_target); $n++ )
{
if( IsFolder($arr_directories_target[$n]) )
{
if( StrIsEqual(PathGetNamePart($arr_directories_target[$n]), PathGetNamePart($arr_directories_source[$source_next_folder_index])) )
{
$target_next_folder_index =  $n;
break;
}
}
}
}

if( $source_next_folder_index > -1 )
{
if( $target_next_folder_index > -1 )
{
MC.Explorer.Goto SOURCE={$source_parent_path ^ PathGetNamePart($arr_directories_source[$source_next_folder_index])} TARGET={$target_parent_path ^ PathGetNamePart($arr_directories_target[$target_next_folder_index])}
}
}

PAGE UP Script:
Code: [Select]
@var $source_path = GetSourcePath();
@var $source_parent_path;
@var $target_path = GetTargetPath();
@var $target_parent_path;
@var $pos;
@var $n;
@var $source_next_folder_index = -1;
@var $target_next_folder_index = -1;
@var $arr_directories_source[];
@var $arr_directories_target[];

// Get the parent path
$source_path = StrSub($source_path, 0, StrLen($source_path)-1);
$pos = StrRFind($source_path, '\');
$source_parent_path = StrSub($source_path, 0, $pos);

$target_path = StrSub($target_path, 0, StrLen($target_path)-1);
$pos = StrRFind($target_path, '\');
$target_parent_path = StrSub($target_path, 0, $pos);

// Get files and folders on source parent
$arr_directories_source = FindFiles($source_parent_path ^ '*');
@var $source_path_index = -1;
for ($n=0; $n<arrayCount($arr_directories_source); $n++ )
{
if( StrIsEqual($arr_directories_source[$n], $source_path) )
{
$source_path_index =  $n;
break;
}
}
// Search folder down the array - Source
if( $source_path_index >= 0 )
{
for ($n=($source_path_index-1); $n>=0; $n-- )
{
if( IsFolder($arr_directories_source[$n]) )
{
LogAppInfo($arr_directories_source[$n]);
$source_next_folder_index = $n;
break;
}
}
}

if( $source_next_folder_index > -1 )
{
// Get files and folders on target parent
$arr_directories_target = FindFiles($target_parent_path ^ '*');
// Search for same folder name
for ($n=(arrayCount($arr_directories_target)-1); $n>=0; $n-- )
{
if( IsFolder($arr_directories_target[$n]) )
{
if( StrIsEqual(PathGetNamePart($arr_directories_target[$n]), PathGetNamePart($arr_directories_source[$source_next_folder_index])) )
{
$target_next_folder_index =  $n;
break;
}
}
}
}

if( $source_next_folder_index > -1 )
{
if( $target_next_folder_index > -1 )
{
MC.Explorer.Goto SOURCE={$source_parent_path ^ PathGetNamePart($arr_directories_source[$source_next_folder_index])} TARGET={$target_parent_path ^ PathGetNamePart($arr_directories_target[$target_next_folder_index])}
}
}

Gotta say thanks to Mathias!

17
Script / UnpackFile OVERWRITEALL
« on: August 11, 2017, 13:34:15 »
Hi,

I am trying to write a script that extract all selected archives to current directory and overwrite all files.

The problem is that the option OVERWITEALL is not working for me. When I run the script, the "Would you like to replace the existing file?" window shows and I have to choose a option for each selected archive. I'm using MC 7.4 build 2377. I wonder if I am doing something wrong here.

@var $source_path = GetSourcePath();
@var $arr_selected_file_paths[] = GetSourceSelectedPaths();

@var $n;
for( $n=0; $n<arrayCount($arr_selected_file_paths); $n++ )
{
   @var $test = UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL, USEEXISTINGQUEUE, NOWAIT");
   LogAppInfo($test);
}

Thanks

18
Documentation / MC.Filesystem.PackFiles
« on: August 09, 2017, 19:15:54 »
Hi,

On the page http://multicommander.com/docs/customcommands_list#mc.filesystem.packfiles I was strugling to make METHOD = "7Zip" work, as it is written like this on the docs, but it wasn't working. Then I changed to METHOD="7z" and it worked.

Maybe its woth expliciting 7z in case someone else also tries to use it.

Thanks

19
Documentation / StrSub SubStr
« on: August 06, 2017, 04:28:07 »
On the page http://multicommander.com/docs/multiscript/functions/string#strsub the title is StrSub and the description is SubStr

20
Support and Feedback / Session, save & mapped network folder
« on: August 04, 2017, 20:16:38 »
Hi,

I don't know if it is a matter of not supported yet, a intended way of working or a bug...

I have a mapped network folder on P:\ (for example \\my_server\dir1)

Then I open MC and navigate to P:\dir2

When I close MC and open it again, all other tabs that were sitting o local hard disks are restored gracefully, but the one I had on P:\dir2 is resetted to C:\

I noted that the file at mcinstallpath\SessionConfig\History\a4c.....ini really has a C:\ on the corresponding tab config. When I change the directory on the other tabs and go to the command line and execute :save the ini file is updated but the tabs showing network mapped paths still show C:\

I also noted that if I create a Tab Session and save it, when I restore it works with mapped network paths ok.

21
Support and Feedback / Left align button text
« on: August 03, 2017, 12:58:20 »
Hi,

Is it possible to left align button text (on button bar)? I use 4 rows and I try to align using space, but when I export config and import on another PC with different monitor resolution it looses the alignment,

Thanks

22
Script / Go To Link Target v2
« on: August 02, 2017, 03:38:05 »
Hi,

As Mathias added new functions to MultiScript, I updated my script. Now it is much mor concise.

For the hardlink detection I use FindLinks from SysInternals on https://docs.microsoft.com/en-us/sysinternals/downloads/findlinks and put it on mcinstallpath\Tools\Links\Hardlinks

MultiScript:
// Junction, Symlink, MountPoint & Windows Shrtcut -> get link target with MultiComander - reliable
// Hardlink -> get link target with findlinks64.exe - communication via text file

@var $source_focus_path = GetSourceFocusPath();
@var $link_target;
@var $link_targets[];
@var $target_count;
@var $link_found;
@var $link_target_temp_file;
@var $temp_file_content;
@var $link_target_file_size;
@var $findlinks_path;
@var $aux[];
@var $aux2;
@var $n;
@var $mcinstallpath = GetTagValue("${mcinstallpath}");

//0 - Not a link (maybe a hardlink)
//1 - Junction
//2 - Symlink
//3 - MountPoint
@var $link_type = GetFSLinkType($source_focus_path);
if( $link_type == 0 )
{
   $link_target = GetWinShortcutTarget($source_focus_path);
   //LogAppInfo('shortcut to ' + $link_target);
   if( !($link_target == '') )
   {
      $link_found = 1;
      SetClipboardText($link_target);
   }
   else
   {
      // Hardlink
      $link_target_temp_file = $mcinstallpath ^ 'Tools\Links\Hardlink\link_target.txt';
      $findlinks_path = $mcinstallpath ^ 'Tools\Links\Hardlink\FindLinks.exe';
      
      if (FileExists($link_target_temp_file) == 1)
      {
         $aux = {"NOPROGRESS", "NODIALOG", "SILENT"};
         DeleteFile($link_target_temp_file, $aux);
      }
      
      LogAppInfo('C:\Windows\System32\wscript.exe "' + $mcinstallpath ^ 'Tools\run_invisible\run_invisible_bat_2_args.vbs" "' + $mcinstallpath ^ '\Tools\Links\Hardlink\bat_findlinks.bat" "' + $source_focus_path + '" "' + $link_target_temp_file + '"');
      MC.Run CMD={'C:\Windows\System32\wscript.exe'} ARG={'"' + $mcinstallpath ^ 'Tools\run_invisible\run_invisible_bat_2_args.vbs" "' + $mcinstallpath ^ '\Tools\Links\Hardlink\bat_findlinks.bat" "' + $source_focus_path + '" "' + $link_target_temp_file + '"'} STARTIN={$mcinstallpath ^ '\Tools\Links\Hardlink'} WAIT
      
      
      // Work on FindLinks' return
      if (FileExists($link_target_temp_file) == 1)
      {
         //Sleep(100);
         
         $link_target_file_size = GetFileSize($link_target_temp_file);
         if ($link_target_file_size > 0)
         {
            $temp_file_content = LoadStringFromFile($link_target_temp_file);
            //LogAppInfo($temp_file_content);
            
            // Delete temp file
            $aux = {"NOPROGRESS", "NODIALOG", "SILENT"};
            DeleteFile($link_target_temp_file, $aux);
            
            // Check/Parse link_target_temp_file content
            @var $temp_file_lines[] = StrLines2Array($temp_file_content);
            if( StrIsWildMatch($temp_file_lines[0], 'Error*') )
            {
               MessageBox('Resolve Link', 'Error logged by FindLinks.', 0);
               break;
            }
            else
            {
               $target_count = arrayCount($temp_file_lines);
               // 4 lines -> no links
               // 7 lines -> 1 link
               // 8 lines -> 2 links
               // etc
               if( $target_count >= 6 )
               {
                  $link_found = 1;
                  $link_target = $temp_file_lines[5];
                  
                  // More than 1 hardlink found
                  if( $target_count > 6 )
                  {
                     // Mount an array with all hardlinks targets, so the user can choose
                     for( $n=5; $n<$target_count; $n++ )
                     {
                        arrayAdd($link_targets, $temp_file_lines[$n]);
                     }
                     
                     // Ask user
                     @var $link_targets_answer = AskOption('Select target', $link_targets, 0);
                     if ($link_targets_answer == -1)
                     {
                        // User cancelled
                        break;
                     }
                     
                     $link_target = $link_targets[$link_targets_answer];
                  }
               }
            }
            
         }
         else
         {
            LogAppInfo('Error');
         }
   
      }
      else
      {
         MessageBox('Resolve Link', 'Operation timeout', 0);
         break;
      }
   }
}
else
{
   // Junction, Symlink or MountPoint
   $link_found = 1;
   $link_target = GetFSLinkTarget($source_focus_path);
}


// Go to target
if( $link_found )
{
   // Clear selected files in the case of the link target being on the same folder
   arrayAdd($aux, '');
   SetSourceSelected($aux, 1);
   
   SetClipboardText($link_target);
   
   // As Mathias said here http://forum.multicommander.com/forum/index.php/topic,1929.0.html
   // "the UI can't be updated until the script is finished since the script is running in the same thread"
   // So there's no way to break going to the folder, then selecting the file in 2 operations
   // We can do it in 1 go using MC.RunCmd ID="Core.1312" that is CTRL+V with the target path on the clipboard
   
   // Go To Link Target
   MC.RunCmd ID="Core.1312"
   
}
else
{
   MessageBox('Resolve Link', 'Not a link.', 0);
}


bat_findlinks.bat file:
FindLinks.exe %1 > %2

23
Script / Load file content to clipboard
« on: August 01, 2017, 18:46:30 »
In my PC, if I try to use the internal function to load file content to clipboard on a rather large file, MC hangs. So I created a script that decides when to use the built in function and when to use clip.exe

MC Script:
@var $focused_file = GetSourceFocusPath();
@var $focused_file_size = GetFileSize($focused_file);
@var $mcinstallpath = GetTagValue("${mcinstallpath}");

// MultiCommander doesn't support files bigger than ???KB, so we have to use window's clip.exe program
if ($focused_file_size > 307200)
{
   //LogAppInfo('C:\Windows\System32\wscript.exe "'  + $mcinstallpath ^ '\Tools\run_invisible\run_invisible_bat_1_arg.vbs" "' + $mcinstallpath ^ '\Tools\run_invisible\load_file_content_to_clipboard.bat" "' + $focused_file + '"');
   MC.Run CMD={'C:\Windows\System32\wscript.exe'} ARG={'"' + $mcinstallpath ^ '\Tools\run_invisible\run_invisible_bat_1_arg.vbs" "' + $mcinstallpath ^ '\Tools\run_invisible\load_file_content_to_clipboard.bat" "' + $focused_file + '"'}
}
else
{
   @var $focused_file_content = LoadStringFromFile($focused_file);
   SetClipboardText($focused_file_content);
}

run_invisible_bat_1_arg.vbs
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
'MsgBox(WScript.Arguments(0))
WshShell.Run """" & WScript.Arguments(0) & """ """ & WScript.Arguments(1) & """",0,true

load_file_content_to_clipboard.bat
clip < %1


The reason to use a bat file instead of just running clip < %1 is that when you execute a command line with no visible cmd, the stdout doen't work.

24
Feature Requests and Suggestions / Sync Panels Navigation
« on: July 25, 2017, 13:15:37 »
Hi Mathias,

I wonder if its viable to have the option to sync the navigation on both panels:

Left panel is at C:\My Documents
Right panels is at external drive D:\Backup\My Documents

When entering a subfolder in any panel, the other panel also enter the same folder

Left panel is at C:\My Documents\Office
Right panels is at external drive D:\Backup\My Documents\Office

Thanks

PS: I'm amazed of how many features MC has!

25
Support and Feedback / Image dimensions
« on: July 18, 2017, 15:39:13 »
Hi,

I was working with images on detailed view. I added the column dimension but it didn't show anything on bmp, jpg and png files. I tried refreshing, going to parent folder and back, but nothing happened. I have Picture tools plugin enabled.

What am I doing wrong?

Thanks

Pages: [1] 2