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.


Messages - pncdaspropagandas

Pages: [1] 2 3 4
1
Support and Feedback / Re: MultiCommander v8.9 BETA
« on: June 02, 2019, 22:47:27 »
Hi. It creates an array with selected files, then it verifies the extension of each file to filter compressed files only. Then for those files, it extracts them.

2
Support and Feedback / Re: MultiCommander v8.9 BETA
« on: May 28, 2019, 20:51:45 »
Hi Ulfhednar

Thankfully it's not just me that is having problem with UnpackFile.

In fact I have the exact same problem you have. The same UnpackFile call and also was working before 8.9 and started crashing when I use it.

My code is basically the same:

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

@var $n;
@var $ext;
for( $n=0; $n<arrayCount($arr_selected_file_paths); $n++ )
{
$file_path = $arr_selected_file_paths[$n];
$ext = PathGetFileExtPart($file_path, 0);
if( StrIsEqualNoCase($ext, ".zip") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".7z") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".rar") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".lha") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".arj") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".cab") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".tar") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".gz") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".gzip") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".bz") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".bzip2") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".tbz") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".tbz2") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
}

4
Support and Feedback / Re: Select files
« on: December 20, 2017, 16:59:20 »
It's working now!  ;)

5
Feature Requests and Suggestions / Re: Create Links
« on: December 20, 2017, 16:57:16 »
 :)

6
Support and Feedback / Re: Find in MultiDataViewer
« on: December 20, 2017, 16:56:40 »
Thanks  :)

7
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

8
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.

9
Feature Requests and Suggestions / Re: Dracula theme
« on: December 06, 2017, 18:36:46 »
Hi herve,

MultiCommander has color settings to all components, so you can create your own theme.

Just go to Configuration > Core Settings > Colors
and Configuration > Explorer Panel Settings > Colors

I mimicked Windows 10 Explorer's colors so it feels natural. To do it I used this excellent program http://www.iconico.com/colorpic/

You can also configure colors on files and folders based on rules, wich in turn can be based on a multitude of rules. Personally I configure it to show empty files as red, files modified on the last 24 hours as green and up to 1 week as blue.

If you feel your theme is usefull to others you can copy the settings on the text files and share on the forum.

I think it would require MC to have a import/export theme to be compatible with https://draculatheme.com but I'm not sure.

If you need further help, please tell.

10
Feature Requests and Suggestions / Re: Create a folder and go to it
« on: December 06, 2017, 11:50:32 »
I also find very useful moving selected files to a new Folder. So I scripted it and mapped to SHIFT+F8:

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], "NOWAIT,NODIALOG,NEWQUEUE");
}
else
{
MoveFile($source_path ^ $answer + $slash, $selected_files[$n], "NOWAIT,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;
}
}

11
Feature Requests and Suggestions / Re: File compare by content
« on: December 06, 2017, 11:46:29 »
I also compare a lot of files and folders. To fulfill my needs, while MC don't do it natively, I created scripts to compare 2 files:

2 files on same panel:
Code: [Select]
import("MFTools-sfv");

// Array com os arquivos selecionados
@var $arr_selected_files[] = GetSelectedPaths();

// Array com o checksum dos arquivos
@var $arr_checksum[];

// Array que controla quais arquivos/checksums já foram analizados no agrupamento
@var $arr_checksum_match[];

// Os arquivos acima tem o mesmo tamanho, o abaixo é maior por conta das linhas em branco que separam os grupos

// Array que recebe os arquivos agrupados por checksum e gera o arquivo log
@var $arr_checksum_log_file[];

@var $base_checksum;
@var $arr_log_differences = { 'No', 'Yes' };
@var $log_differences;
@var $log_file = GetSourcePath() ^ '_MC_file_differences.log';
@var $log_file_content;

// result == 0 same hash; 1 == different hash
@var $result = 0;
@var $cs;
@var $csn;
@var $n;
@var $i;
@var $c;
@var $j;

if( arrayCount($arr_selected_files) == 0)
{
MessageBox('Compare content of files', 'Select 2 or more files.', 0);
}
else if( arrayCount($arr_selected_files) == 1)
{
MessageBox('Compare content of files', 'Select 2 or more files.', 0);
}
else
{
// Calculate checksums
for( $n = 0; $n < arrayCount($arr_selected_files); $n++ )
{
$cs = ChkSum_Calculate($arr_selected_files[$n], 2);
arrayAdd($arr_checksum, $cs);
}

// All checksums are equal?
$cs = $arr_checksum[0];
for( $n=1; $n < arrayCount($arr_selected_files); $n++ )
{
$csn = $arr_checksum[$n];
if( !(StrIsEqual($cs, $csn)) )
{
$result = 1;

if( arrayCount($arr_selected_files) > 2)
{
// User input
$log_differences = AskOption( 'Log file differences to _file_differences.log?', $arr_log_differences, 0 );

if( $log_differences )
{
// Delete previous log
if ( FileExists($log_file) )
{
@var $options[] = {"NODIALOG", "NOPROGRESS"};
DeleteFile($log_file, $options);
if ( FileExists($log_file) )
{
MessageBox('Compare content of files', 'Could not delete "_file_differences.log".', 0);
break;
}
}

// Log file initialization
arrayAdd($arr_checksum_log_file, "The following files are grouped by checksum (SHA1):");
arrayAdd($arr_checksum_log_file, "");

// Creates a new array to control wich files were already matched and group them
for( $n=0; $n < arrayCount($arr_checksum); $n++ )
{
arrayAdd($arr_checksum_match, 0);
}

// Group files by checksum
// for each file/checksum (as base)
for( $n=0; $n < arrayCount($arr_selected_files) - 1; $n++ )
{
// base not checked/grouped/matched yet?
$c = $arr_checksum_match[$n];
if( $c == 0 )
{
$base_checksum = $arr_checksum[$n];
$arr_checksum_match[$n] = 1;
arrayAdd($arr_checksum_log_file, $arr_selected_files[$n]);
// for each following file/checksum
for( $j = $n + 1; $j < arrayCount($arr_selected_files); $j++ )
{
$cs = $arr_checksum[$j];
if( StrIsEqual($base_checksum, $cs) )
{
$arr_checksum_match[$j] = 1;
arrayAdd($arr_checksum_log_file, $arr_selected_files[$j]);
}
}

// Add a break to the log file
arrayAdd($arr_checksum_log_file, "");
}
}

// Write log file
$log_file_content = StrLinesArray2String($arr_checksum_log_file);
SaveStringToFile( $log_file, $log_file_content, 1 );
}

}

MessageBox('Compare content of files', 'Files are different.', 0);
break;
}
}

if( $result == 0)
{
MessageBox('Compare content of files', 'All files are equal.', 0);
}
}

2 files on different panels:
Internal Command - File Checksum Verifier - Compare contents od two files

2 folders - using WinMerge:
Custom Command
MC.Run CMD='"${mcpath}Tools\\WinMerge\\WinMergeU.exe"' ARG='/s /r /e /x /u /maximize "${sourcepath}" "${targetpath}"'

2 folders - using FreeFileSync:
Code: [Select]
@var $mcinstallpath = GetTagValue("${mcinstallpath}");

@var $arr_ffs_paths[];
arrayAdd( $arr_ffs_paths, "C:\\Program Files\\FreeFileSync\\FreeFileSync.exe" );
arrayAdd( $arr_ffs_paths, "C:\\Program Files (x86)\\FreeFileSync\\FreeFileSync.exe" );

@var $ffs_path_mc_tools;
@var $ffs_path = "";
@var $path;

@var $leftpath = GetTagValue("${leftpath}");
@var $rightpath = GetTagValue("${rightpath}");

@var $n;

// First try to use ffs at Program Files
for( $n=0; $n<arrayCount($arr_ffs_paths); $n++ )
{
$path = $arr_ffs_paths[$n];
if( FileExists($path) == 1 )
{
$ffs_path = $path;
break;
}
}
// If not found then try to use mcinstalldir\Tools\FreeFileSync
if( StrIsEqual($ffs_path, "") )
{
$ffs_path_mc_tools = $mcinstallpath ^ "Tools\\FreeFileSync\\FreeFileSync.exe";
if( FileExists($ffs_path_mc_tools) )
{
$ffs_path = $ffs_path_mc_tools;
}
else
{
MessageBox('ffs', 'ffs not found at "Program Files", neither at Tools dir "' + $ffs_path_mc_tools + '"', 0);
break;
}
}

LogAppInfo('Using: '+ $ffs_path);

//LogAppInfo('"' + $ffs_path + '" -leftdir "' + $leftpath + '" -rightdir "' + $rightpath + '"');
MC.Run CMD={$ffs_path} ARG={'"' + $mcinstallpath ^ 'Tools\\FreeFileSync\\Profiles\\Compare_Time_Size.ffs_gui" -leftdir "' + $leftpath + '" -rightdir "' + $rightpath + '"'}

13
Support and Feedback / Re: Select files
« on: September 30, 2017, 18:27:42 »
Thanks  :)

14
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

15
Script / Re: Create folder and move selected files
« on: September 21, 2017, 16:51:34 »
Thanks Mathias. Now it is working!  :)

16
Feature Requests and Suggestions / Re: Move
« on: September 21, 2017, 16:05:27 »
Ok, thanks!

17
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?

18
Sure Mathias. That would be great.

19
User Contributed Content / Re: Create an empty file
« on: September 09, 2017, 22:35:22 »
I added the possibility to create multiple empty files at once, just like folder creation where you write folders separated by semi-colon:

Code: [Select]
@var $n;
@var $file;
@var $file_name;

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

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

@var $arr_files = StrTokenize2Array($answer, ";");
for( $n=0; $n<arrayCount($arr_files); $n++ )
{
$file = $arr_files[$n];

// Full path name
$file_name = GetSourcePath() ^ $file;

// 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. Stopping script.", 0);
break;
}
else
{
// Create empty file
SaveStringToFile($file_name, "", 0);
}
}

// Select created file
if( arrayCount($arr_files) == 1 )
{
// 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"
}

20
User Contributed Content / Re: Create an empty file
« on: September 09, 2017, 21:58:00 »
Good point. Thanks

21
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"
}

22
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][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ss][Aa][Nn][Dd][Bb][Oo][Xx]|[Ss][Cc][Oo][Pp][Ee]|[Ss][Cc][Oo][Pp][Ee][Dd]|[Ss][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>

23
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);
}
}
}
}

24
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>

25
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>

Pages: [1] 2 3 4