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

Pages: [1] 2 3 4 5 ... 20
Support and Feedback / Re: How to change the tab color?
« on: February 27, 2023, 12:13:47 »
Core Settings > Colors

Support and Feedback / Re: Call ImageMagick to convert file format
« on: January 28, 2023, 17:46:24 »
2. Menu Help > MultiScript debugger...

1. I'm almost sure that PathGetNamePart( ${sourcefocusname}, 1).webp will not work inside ARG="...". I think you would need to write something like
Code: [Select]
@var $path = GetSourceFocusPath();
@var $new_name = GetSourcePath() ^ PathGetNamePart( $path, 1 ) + ".webp";

MC.Run CMD="D:\ImageMagick\convert.exe" ARG="${focusfilepath} ${new_name}";

Double click on empty panel will open a tab with default path (which can be changed in Explorer Panel setttings > Display > Tab > Default settings for new tab)
It is also possible to load existing tab set or session (File > Tab; File > Tab Sessions)

Support and Feedback / Re: Custom date format for F9 shortcut
« on: January 20, 2023, 17:45:26 »
You can create a User Defined Command of MultiScript type and bind it to a hotkey or insert it on QuickLaunch bar. The simple one could look like

Code: [Select]
@var $now = GetTime();
@var $date = FormatDate("dd-MM-yy" , $now);
@var $path = GetSourcePath() ^ $date;

If you'd like to have different formats available.
Code: [Select]
@var $now = GetTime();
@var $options[];

arrayAdd( $options, FormatDate("dd-MM-yy" , $now) );
arrayAdd( $options, FormatDate("dd-MM-yyyy" , $now) );
arrayAdd( $options, FormatDate("yyyy_MM_dd" , $now) );
arrayAdd( $options, FormatDate("ddd MMM yyyy" , $now) );

@var $o = AskOption( "Make new dir: select date format", $options, 0 );
if( $o > -1 )
  @var $path = GetSourcePath() ^ $options[$o];

Support and Feedback / Re: Multi-Rename Syntax
« on: January 01, 2023, 17:08:42 »
What do I have to put in "Find" and "Replase with" so that everything disappears behind the first "["?

In Multirename
- check RegEx
- select Replace only name
- in Find edit box type (.*)( \[.*)
- in Replace edit box type $1

Test on fake files at first

Feature Requests and Suggestions / Re: Multiscript StrSplit improve
« on: December 10, 2022, 17:20:26 »
Is Option 2 really needed ? if you enter many delimiters . dont you always want it to split at the position where any of the delimiters are found ? (option 1 ?)

Actually, there may also be 3 option :) The first char of the delimiter param would be the delimiter (";" in the code above). If not found, then the second one etc. So:
- 1st from the input string disregarding delimiters order
- 1st from the input string regarding delimiters order
- 1st from the delimiter string disregarding input string index

Feature Requests and Suggestions / Re: Some ideas
« on: December 10, 2022, 16:51:33 »
When you have selected several files, and using the windows hotkeys, pressing f2 should open the multirenamer windows, with those files already loaded.

If you want to open MultiRename dialog with F2, it can be done via Menu Configuration > Keyboard Customization

So you mean if you set target name like  CopyFile ("C:\NewFile.txt" , C:\MyFile.txt" , "NODIALOG, OVERWRITE_ALL" );
It does not work ?

Code: [Select]
# Error "Source and Target file are the same. Cannot copy a file to itself"
# (err.png)
@var $res = CopyFile("d:\\temp\\abc.txt", "d:\\temp\\1.txt", "NODIALOG")

# $res = 1, but file is not copied
$res = CopyFile("d:\temp\abc.txt", "d:\temp\1.txt", "NODIALOG")

# Shows copy dialog with wrong destination path (err2.png),
# but produce no error, file is not copied
$res = CopyFile("d:\temp\abc.txt", "d:\temp\1.txt")

Feature Requests and Suggestions / Multiscript StrSplit improve
« on: December 09, 2022, 14:37:47 »
Now delimiter param in StrSplit function is used as a single separator. It means that the following code will not split input string

Code: [Select]
@var $str = "123,|456;|,789";
@var $arr = StrSplit($str, ";|,");

I request additional optional param like any_char (0/1):
- with the value 0 the function would have current behaviour;
- with the value 1 the character of the delimiter which has the lowest index in the input string would be used as a delimiter (so in the code above it would be "," char)
- with the value 2 the first found char of the delimiter would be used as a delimiter (so in the code above it would be "|" char)

Here's updated version with simple CSV parser. Please, don't use in production! :)

Usage example:
 - paste this script into the MultiScript debugger
 - focus your CSV-file on the target panel
 - switch to source panel and select xml-files
 - return to debugger and run

Code: [Select]
# parse csv S&R file
function ParseCSV($file, $separators, $quote_chars)
  if ( !(StrLen($separators) == 1) )
    $separators = ",";

  if ( StrLen($quote_chars) == 0 )
    $quote_chars = "\"";

  @var $reg_ex = "^([" + $quote_chars + "])(.*)\\1$";

  @var $lines = LoadArray($file);
  @var $lines_cnt = arrayCount($lines);

  # single-string multiline S&R patterns
  # $pattern[0] - search pattern, $pattern[1] - replace pattern
  @var $pattern[2] = {"", ""};

  @var $i;
  for ($i = 0; $i < $lines_cnt; $i++)
    # $pair[0] - search pattern, $pair[1] - replace pattern
    @var $pair = StrSplit($lines[$i], $separators);

    # invalid line
    if ( !(arrayCount($pair) == 2) )

    # append unquoted patterns
    $pattern[0] = $pattern[0] + StrRegExpReplace( $pair[0], $reg_ex, "$2" ) + "\n";
    $pattern[1] = $pattern[1] + StrRegExpReplace( $pair[1], $reg_ex, "$2" ) + "\n";

  return $pattern;


@var $sar_file    = GetTargetFocusPath();
@var $sar_pattern = ParseCSV($sar_file, ";", "\"`");

if ( ( StrLen($sar_pattern[0]) * StrLen($sar_pattern[1]) ) > 0 )
  @var $sel_files = GetSourceSelectedPaths();
  @var $sel_count = arrayCount($sel_files);

  @var $n;
  for($n = 0; $n < $sel_count; $n++)
    @var $file = $sel_files[$n];
    @var $new_file = "*_new.*";

    MC.Utils.FindAndReplace MODE="Many" FIND={$sar_pattern[0]} REPLACEWITH={$sar_pattern[1]} FILE="{$file}" TARGET="{$new_file}" SILENT REPLACEALL OVERWRITE

I haven't stress-tested it.

Documentation / Re: Missing Documentation - Status
« on: December 08, 2022, 17:26:38 »
StrRegExpReplace description is missing

Well, S&R works:

Code: [Select]
@var $sel_files = GetSourceSelectedPaths();
@var $sel_count = arrayCount($sel_files);
@var $find_text = "aaa\\nbbb";
@var $repl_text = "xxx\\nyyy";

@var $n;
for($n = 0; $n < $sel_count; $n++)
  @var $file = $sel_files[$n];
#  @var $new_file = PathGetPathPart($file) ^ PathGetNamePart($file, 1) + "_new" + PathGetFileExtPart($file);
  @var $new_file = "*_new.*";

  MC.Utils.FindAndReplace MODE="Many" FIND={$find_text} REPLACEWITH={$repl_text} FILE="{$file}" TARGET="{$new_file}" SILENT REPLACEALL OVERWRITE

The full automation requires parsing CSV-file, of course. If its structure is known and "stable", it shouldn't be hard.

UPD. Actually, parsing CSV might be quite hard (in MC).

I want to copy some file to the same dir with a new name (manually specified, no autorename). But CopyFile function accepts only path as a target param.

Is it somehow possible to achieve the goal? If no, maybe enhance CopyFile with an additional param or implement a new function CloneFile?

I have the following UDC:

Code: [Select]
MC.Utils.FindAndReplace REPLACEALL MODE="Many" FIND="fff\nddd" REPLACEWITH="zzz\naaa" FILE="d:\\temp\\1.txt" TARGET="*_new.*" SILENT OVERWRITE
It works if target file doesn't exist and doesn't work otherwise

UPD. It seems that TARGET param doesn't support direct file names. I.e. if TARGET="d:\\temp\\1_new.txt" it doesn't work. Mask works OK.

1. Create new User Defined Command
2. Right click on the QuickLaunch Bar and select "Insert User Defined command"

Result: there's no newly created command in the list. MC restart required

Now only Program Path parameter has [R] button to convert path to relative. It woud be great to have the same for Start Folder and Alternative Icon parameters. Actually relative paths are already supported, but it's a bit inconvenient to change Alt. Icon manually via xml-file

Support and Feedback / Re: Dragging bug
« on: October 19, 2022, 11:46:58 »
How do you cancel dragging?

Esc or drag over "invalid" region.

Support and Feedback / Dragging bug
« on: October 19, 2022, 09:19:20 »
1. Start MC with multiple tabs
2. From the current tab (Tab1) drag a file over inactive tab (Tab2)

Result: Tab2 is activated with blank Explorer panel and drive combo-box

3. Cancel dragging
4. Now press Al+F1/F2 (depending on current panel) and select a drive

Result: New path is set in Tab1, not in current blank Tab2

MC v12.5 b2910 x64 Portable, Win11 Pro Portable

Feature Requests and Suggestions / Re: Misc requests
« on: November 11, 2019, 07:50:05 »
Since requests started here...

1. Now when unpacking password-protected 7z-archive with encrypted filenames, MC asks password 3 times. It would be good to see password prompt only once.

2. Now if archive contains sub-archives, MC only goes inside top-level archive. Then it unpacks packed archive and (seems to) redirect it to the system although it is supported by MC. E.g. if there is a zip inside 7z, MC will go into 7z, but zip will be opened in Winows' Explorer. If there's a rar inside 7z, nothing will happen (probably because there is no app associated with *.rar files in my system). So it would be great if MC could go through all sub-archives.

3. External archive profiles.

4. Some kind of status info for a focused file in the List mode.

Could you add a screenshot with the place where I need to add it, please?

You may create user command, set it to MC.Explorer.Copy and provide it with NODIALOG parameter.

Support and Feedback / Re: Copy all files from multiple folders
« on: October 16, 2019, 15:10:11 »
If these folders are inside one parent-folder you may switch to Flat View (Ctrl+Shift+B), select files and launch MultiRename (Menu Extensions > MultiRename).

Create user defined command, assign hotkey to it and then add this command to the quicklaunch bar or buttons panel

Support and Feedback / Re: How to keep not reachable path
« on: September 24, 2019, 15:03:40 »
Go to Menu Configuration > Explorer Panel Settings, then Display tab, scroll to Save on exit
Try uncheck Remember only paths to local harddrives

Support and Feedback / Re: Deleted files don't go to Recycle Bin
« on: September 24, 2019, 08:52:25 »
Additionally, what's the difference between Remove link target and link to Remove link, not target?

1. Create temporary folder (you may optionally copy some test files there)
2. Create a couple of Junctions (Tools > File Links > Create Links...) to that folder
3. Try delete one of the junctions with Remove link, not target option
4. Try delete other junction with Remove link target and link option

Pages: [1] 2 3 4 5 ... 20