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

Pages: [1] 2 3 4 5 ... 22
1
Thanks a lot for looking at this Mathias.
A non-standard " ?  I'm just using default Win11 1250 codepage, no unusual fonts etc.
Maybe corrupted when pasting between dialogs & browser or sth?  Now I am looking for that I can see the "s are different. ???
I've re-typed it instead of using snippets & it looks OK now.  ::)
Apologies.

2
Hi Mathias,
with MC 15.5 b3094 x64, Win11 24H2 b26100.4061 x64, this is what I am finding : -
Code: [Select]
@var $options[] = {“RECYCLE”, "NODIALOG"};
DeleteFiles($array, $options);
- deletes files (not recycle bin) No dialog but progress briefly appears as expected

Code: [Select]
@var $options[] = {“RECYLE”, "NODIALOG"};
DeleteFiles($array, $options);
- deletes files (not recycle bin) No dialog but progress briefly appears as expected

Code: [Select]
@var $options[] = {“RECYLE”};
DeleteFiles($array, $options);
- deletes files to recycle bin with dialog

Code: [Select]
@var $options[] = {“RECYCLE”};
DeleteFiles($array, $options);
- deletes files (not to recycle bin) with dialog

Perhaps you can replicate this?   ;)

3
[***

DeleteFile already support NODIALOG option.. and RECYCLE. it is actually the documentation that misspell it. the code actually require it as RECYCLE

// Deletes all selected files to recycle. No confirm dlg, no progress
Code: [Select]
@var $filenames = GetSourceSelectedPaths();
@var $options[] = {"NODIALOG", "RECYCLE", "NOPROGRESS"};
DeleteFiles( $filenames, $options);

Thanks for the info Mathias.
I tried RECYCLE & it seemed to fail in the debugger, when I added it as RECYLE  it worked (!) so I figured that it was just sth that slipped through.
& it has been working for weeks as a button, it was adding NODIALOG  that caused it to fail... perhaps somehow the combo of RECYLE with NODIALOG reveals the error?
Running the debugger today the options all appear to work (I didn't realize that I could use NOPROGRESS) with the caveat that the files selected do not appear to go to the recycle bin, & running this routine in the debugger multiple times caused MC to simultaneously close when I closed the Explorer recycle bin window (this had been opened after the routine to check for the files).  Did it 3 times in a row. 
Wondering if the options need to be in the order shown or if can I use them in any sequence? 
I will have to try & fully test all this again later on..... ::)
I will let you know what I find ;)

4
- I would like to be able to set MScript to recurse sub-dirs - as with DOS script cmds e.g.
Code: [Select]
for /d /r "%base_dir%" %%d in (.) do
Don't understand.. you want a MultiScript function to get a list of files for a folder and subfolders. ?
Thanks for the reply Mathias.
The code above was the DOS solution for something I failed to get MS to do.
I wanted to search a folder, its' sub-dirs & select files & then run a process (e.g. get source folder; select *.txt, *.jpg, *.bat in the folder inc sub-dirs; delete).
I couldn't determine how get MS to recurse & "do" in the way the DOS command does, which I needed as I wanted to handle several different file types in nested folders.
Assuming MS cannot do this (& it is not just my incompetence!) I'd like MS to have this functionality.

5
I think the thing I miss most in MC is 'Undo' as in MSExplorer. I understand this is a big job. I currently use the log to check what mistakes I've been making, so it's not all bad :)) .

I like playing with MultiScript & I would like to improve my ability, thus would like a few improvements to the debugger (RMB context menu might be nice). Some idiots guide-type tutorial entries might be helpful as some of the error msgs are not sufficient for me to quickly pinpoint errors unfortunately. It is better than DOS though  :)

Slightly less demanding than a debugger makeover:-
 - I would like to be able to set MScript to recurse sub-dirs - as with DOS script cmds e.g.
Code: [Select]
for /d /r "%base_dir%" %%d in (.) do
 - I'd like NODIALOG added to DeleteFiles e.g.
Code: [Select]
@var $options[] = {“RECYLE”};  "NODIALOG"   
DeleteFiles($array, $options);
  (Maybe Recyle needs to be spell-checked?  :P)


Thanks for a great piece of reliable & useful software.

6
Beta Releases / Re: 15.3
« on: April 18, 2025, 14:32:58 »
Thanks for replies Mathias.
We can always rely on M$ to create problems  ;D

7
Beta Releases / Re: 15.3
« on: April 17, 2025, 11:14:15 »
Thanks Mathias.
I did wonder why/how it was the shell commands that caused it, have never seen it before.
I selected items in MC & then used ctrl+x / v using MC to navigate between folders. IIRC there had also been a file being moved to USB via MC move command/dialog when I'd started using the shell commands. 

& Thanks for the update but FYI
Code: [Select]
Downloading update for Multi Commander...
Failed to download MultiCommander (HTTP Status code : 404)
Error : Call "Server Error" , Failed with error code : 13
is output by the updater ATM.

9
Beta Releases / Re: 15.3
« on: April 16, 2025, 22:29:25 »
Thanks Mathias :)
Had a couple of crashes/restarts when using ctrl+x ctrl+v. 
Sent in the crash reports. It referenced kernel.dll in one dialog.

10
Beta Releases / Re: 15.3
« on: April 16, 2025, 10:02:06 »
Received update to 15.4 b3086 today.
Change log was blank but I installed it anyway...
I'll let you know if my PC explodes  ;)

11
Script / Re: Is there a StrReplace that's case insensitive?
« on: April 09, 2025, 13:56:09 »
See latest beta that was release today

Thanks Mathias
Code: [Select]
$NewName = StrReplace($OrgName, "<string to match>", "<replacement>", "ignorecase");is like Xmas come early  ;D

12
Script / Re: Is there a StrReplace that's case insensitive?
« on: April 08, 2025, 13:39:44 »
Thanks Mathias. Would be great if you can find time for it  ;)

13
Script / Is there a StrReplace that's case insensitive?
« on: April 07, 2025, 17:26:13 »
I'm wondering if there is a case insensitve version of StrReplace
I've seen updates for MS commands in MC updates but I know that some of the MS commands haven't been listed in the docs yet, so does this exist or did I only dream about it ? ;)


14
Support and Feedback / Re: Regex matches in MR
« on: April 04, 2025, 12:28:09 »
Thanks for the replies Mathias & Jungle.
The regex 'flavor' is supposed to be C++ - which is what I set the online test to.
I spend quite a lot of time using regex renames & I do try to ensure the box is ticked, I definitely did on this as I was trying flavor variations for about 15mins when my first checked & rechecked c++ version wouldn't work. :(
So.
Today #1 works fine  :o ???  MC has been updated since but still this is a mystery.
Jungle is correct about entering the regex via the ... dialog, as adding it via the entry fields works. That must have been the gotcha on that.

Thanks again!

15
Support and Feedback / Regex matches in MR
« on: April 02, 2025, 13:20:53 »
I have a couple of questions about regex use in MultiRename

(?:[0-9a-z]{30})
should match string:-
0ec4dc9a5ea17339b06d1d0f1b2283
but doesn’t find it whether alone or placed in a longer string.

Test page on regex101.com shows it works in both instances eg:
Quote
(?:[0-9a-z]{30})  /gm
Non-capturing group (?:[0-9a-z]{30})
Match a single character present in the list below [0-9a-z]
{30} matches the previous token exactly 30 times
0-9 matches a single character in the range between 0 (index 48) and 9 (index 57) (case sensitive)
a-z matches a single character in the range between a (index 97) and z (index 122) (case sensitive)


Multiple search matches when | separated eg:-
(abc|zxy|der)
won’t work, each element needs to be separately entered on an individual line.

Is this expected behaviour?
I checked the regex's work online so I'm wondering what is different.

16
Beta Releases / Re: 15.3 Beta 3079
« on: April 02, 2025, 13:06:43 »
Thanks for the fix Mathias ;)

17
Beta Releases / Re: 15.2 Beta 3078
« on: March 28, 2025, 12:18:39 »
Thanks for the update Mathias.
Unfortunately some of my context items have now been lost.  They still exist in Explorer but not in MC i.e. - the base item remains but the submenu is a blank tab.  ::)
Tried a reinstall - no change.
Can I manually restore these? Regedit?

18
Script / Re: 7-zip profiles vs cmd line 7-zip?
« on: February 10, 2025, 12:50:50 »
Sorry for destroying your Monday morning Mathias. 
You pointed me in the right direction.
So I realized what was wrong finally!
I'd used
Code: [Select]
@var $Items = GetSourceItems();but should have used
Code: [Select]
@var $Items = GetSourceItems(1);
 ::)

Thanks for the assist :)

A bit OT:-
 https://multicommander.com/Docs/multiscript/functions/filesystem#deletefiles
Shows RECYLE, should this be amended to RECYCLE? It doesn't appear in the $options debugger output.
If I add NODIALOG & RECYLE it doesn't send to the recycle bin.  I thought it would  ??? 


Lastly .... how do you script to recurse subdirs from GetSourcePath etc?

19
Script / Re: 7-zip profiles vs cmd line 7-zip?
« on: February 10, 2025, 11:51:25 »
Thanks for the reply Mathias.
Using your code works i.e. giving the instruction a fixed path for items, when I try to get it to work calling the items in my filtered array, it hangs.

The debugger has the red highlight active on the last line but clicking on anything fails to advance the operation.
The only window that shouldn't be present is the hung dialog. (See attached) No error dialogs or windows.

All MC dialogs will minimize but won't finish the op, restart req'd.
Is it related to how the path/filename is being added to the array?  the $fullfilename is correctly enumerated in the debugger showing the whole string.

20
Script / Re: 7-zip profiles vs cmd line 7-zip?
« on: February 09, 2025, 14:04:04 »
Yes the idea was to scan subfolders; zip specifically named folders; delete those source zipped folders, leaving the 7z in their place & log operations.
(a & b were just placeholders for my test before giving it actual pathing)

I was thinking of adding a StrIsRegExpMatchNoCase or similar to delete redundant files recursively.  Basically a tidy up operation on a number of subfolders.
I got this, but the DeleteFiles instruction hangs the debugger & MC with a deletion dialog, tried with & without {}s on the last instruction.  Also tried SILENT to no effect  ???
Am I missing sth or is this a bug?

Code: [Select]
@var $currentPath = GetSourcePath();
@var $Items = GetSourceItems();
@var $count = arrayCount($Items);
@var $curItem;
@var $fullFilename;
@var $array2[];

// Loop all items in the $Items array
for( $n = 0; $n < $count; $n++)
{
  $curItem = $Items[$n];
  $fullFilename = $currentPath ^ $curItem;
  @var $isMatch = StrIsRegExpMatchNoCase($fullFilename, "[a-z0-9]{30}");

  if($isMatch)
  {
      arrayAdd($array2, $curItem);
  }
}

@var $options[] = {"NODIALOG"};
DeleteFiles($array2, $options);

Thanks in advance for looking at this

21
Script / Re: 7-zip profiles vs cmd line 7-zip?
« on: February 09, 2025, 12:46:36 »
I ended up adding a Console .bat to a button.
This works OK scanning for subfolders, 7-zipping at max compression & deleting if 7z op is OK. Ops are logged to txt on base dir.

I would like to be able to do sth like this with MS as I think I could potentially make a richer & more functionally extensive script but I'm not sharp enough on MS atm  :-\
I will see if I can come up with sth in due course ;)

Code: [Select]
@echo off
setlocal

REM Set the base directory
set "base_dir=C:\dir\to\scan\"
REM Set the full path to the 7-zip executable
set "7zip_path=C:\Program Files\7-Zip\7z.exe"
REM Set the log file path
set "log_file=%base_dir%\operations_log.txt"

REM Initialize the log file
echo Log file created on %date% at %time% > "%log_file%"

REM Recursively scan for folders named "a" and "b"
for /d /r "%base_dir%" %%d in (.) do (
    if exist "%%d\a" (
        echo Compressing folder "a" in "%%d" >> "%log_file%"
        "C:\Program Files\7-Zip\7z.exe" a -t7z -mx=9 "%%d\a.7z" "%%d\a\" >> "%log_file%" 2>&1
        if exist "%%d\a.7z" (
            echo Zip succeeded. Deleting folder "%%d\a" >> "%log_file%"
            rmdir /s /q "%%d\a" >> "%log_file%" 2>&1
        ) else (
            echo Failed to create zip for "%%d\a" >> "%log_file%"
        )
    )

    if exist "%%d\b" (
        echo Compressing folder "b" in "%%d" >> "%log_file%"
        "C:\Program Files\7-Zip\7z.exe" a -t7z -mx=9 "%%d\b.7z" "%%d\b\" >> "%log_file%" 2>&1
        if exist "%%d\b.7z" (
            echo Zip succeeded. Deleting folder "%%d\b" >> "%log_file%"
            rmdir /s /q "%%d\b" >> "%log_file%" 2>&1
        ) else (
            echo Failed to create zip for "%%d\b" >> "%log_file%"
        )
    )
)

endlocal

22
Script / Re: 7-zip profiles vs cmd line 7-zip?
« on: February 08, 2025, 15:42:32 »
Thanks for the reply Mathias.
I will try to run it with the CLI values & see how far I get ;)
-mx9 is the max 7-Zip compression switch.

23
Script / 7-zip profiles vs cmd line 7-zip?
« on: February 07, 2025, 15:57:14 »
I was looking at using a script that calls the packer function & uses 7-zip max compression, but cannot see how to specify or change the command for MAX on 7-zip specifically in the packer profiles, I cannot get the 'external' button to work for an external packer either. Duh not activated yet :-\  ;D
Running Internal zip (MAX) doesn't give me the smallest possible output.
Is this functionality present or do I just call the external 7-zip?

I got as far as this, where I wanted to compress selected subfolders:-
Quote
@var $zipPath = "C:\Program Files\7-Zip\7z.exe";
@var $scanDir = "C:\path\to\the\directory";

@function CompressFolder($folderPath, $folderName) {
    @var $zipFileName = "$folderName.7z";
    MC.Run CMD="EXTRACT" TARGET="$folderPath" SOURCE="\"$zipFileName\"" USERCONFIRMATION="NO" ARCHIVE="$zipPath" ARGUMENTS="a -r \"$zipFileName\" \"$folderPath\\*\"";
}

@function ScanFolders($currentDir) {
    @var $dirs = MC.Filesystem.ListDirs(path="$currentDir");
    @for $dir in $dirs {
        @var $folderName = MC.GetValue(PATH="$dir", INDEX="basename");
        @if ($folderName == "a" || $folderName == "b") {
            CompressFolder($dir, $folderName);
        }
        ScanFolders($dir);
    }
}

ScanFolders($scanDir);

Any help on how to call max compression appreciated ;)

24
Beta Releases / Re: v14.6 BETA
« on: January 31, 2025, 13:01:42 »
Oh OK thanks Mathias... You had me worried!   :D


***
Yaaaay! Thanks for the fixes Mathias c/o b3066!  8) ;)

25
Beta Releases / Re: v14.6 BETA
« on: January 31, 2025, 12:47:36 »
Thanks for the update Mathias. ;)

I noticed after the update today b3064, that the filesize output is missing from the bottom left of the panel.  (Where I have put a yellow box on the image)
Tried restart, no luck. Has a setting been lost or is it broken?
Thanks

This is the Selection Status Area in MC explorer panel settings, yes? Still cannot get it to show anything , Win11 Explorer does show these details OK in Status Bar.
I wondered if enable/disable freespace display would do anything but it didn't.
I also noticed the shifting of the panel nav icons left (attached), I haven't updated my gfx drivers btw.
I guess a clean re-install is next...  :-\

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