Why is this "Auto Switch Mode" not working?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
slishnevsky
Junior Member
Junior Member
Posts: 5
Joined: 2023-12-11, 02:43 UTC

Why is this "Auto Switch Mode" not working?

Post by *slishnevsky »

Hi.
I want to set up an Auto Switch Mode so that when I switch to a shared network folder \\192.168.1.1\Camera\axis-00408CDC0297\
it would apply the following setting: "Show all files in current dir and all subdirs" (cm_DirBranch) + "Show only video files (cm_SrcUserDef=314)"

So, I followed these steps:
  • Added a custom User Type "Videos" for specific extensions
  • Added a custom View Mode "Camera recordings" where I specified Auto-run commands:
    "Show all files in current dir and all subdirs" (cm_DirBranch) + "Show only video files" (cm_SrcUserDef=314)
  • Added custom Auto Switch Mode, that should trigger a switch to "Camera recordings" View Mode defined in previous step when I open \\192.168.1.1\Camera\axis-00408CDC0297\ folder
Image: https://i.imgur.com/RlsrgLv.png

For some reason, it's not working.
Please see the screenshot.

Any idea why?

Thanks!
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Re: Why is this not working?

Post by *tuska »

Hi,

Create the filter as follows.
Add the following to the "usercmd.ini" file (if this file does not exist, create it with a text editor)

Code: Select all

[em_Videos]
button=
cmd=cd *.avi *.mkv *.wmv *.mp4 *.mov
menu=cd *.avi *.mkv *.wmv *.mp4 *.mov|https://www.ghisler.ch/board/viewtopic.php?t=81367
[Option: Click on button with command: cm_CommandBrowser > click on "usercmd.ini" > New... > em_Videos >
command: cd *.avi *.mkv *.wmv *.mp4 *.mov > Tooltip ... > OK > OK]

View mode
Change "Auto-run commands" as follows:

Code: Select all

cm_DirBranch,em_Videos|cm_SrcAllFiles
|cm_SrcAllFiles ... Everything that comes after '|' is executed after the View mode is ended -
in this case, the "Default" View mode is therefore automatically executed.

In my opinion, this View mode should have the following <Default> settings:
- Columns view: Full
- Sort order: Name
Each user can set what he want here or leave the original setting as it is.

Change "Auto Switch Mode" as follows:
+\\192.168.1.1\Camera\axis-00408CDC0297\*
* causes subdirectories to be accessed as well

Remark:

Code: Select all

cm_SrcUserDef	314	Source: Select user type
This command is a command WITHOUT parameters, i.e. it only calls up the filter mask and can NOT automatically
call up the desired file types for videos with this command. An em_command (no blanks!) as listed above can do this.
________________________________________________________________________
I suggest that you choose a more descriptive title (you can edit your first post), e.g.
"Show only video files in Branch View automatically".


Overview: View Mode | Auto Switch Mode | Custom columns view
sa16
Senior Member
Senior Member
Posts: 217
Joined: 2021-09-10, 07:15 UTC

Re: Why is this not working?

Post by *sa16 »

Should the cm_DirBranch command work on FTP?
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Re: Why is this not working?

Post by *tuska »

sa16 wrote: 2024-03-02, 17:44 UTC Should the cm_DirBranch command work on FTP?
I don't know and also because I don't use it :?
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Why is this "Auto Switch Mode" not working?

Post by *petermad »

2sa16
Should the cm_DirBranch command work on FTP?
No, it does not - but it works on Network Shares.


2slishnevsky
cm_SrcUserDef opens the dialog for defining a Custom file mask = Ctrl+F12
What you could have used, was cm_SrcUserSpec which applies the LAST USED file mask - since that might have changed since you last used your Auto Mode Switch, it is better to use an em_Videos command as tuska suggests.

You can use cmd=cd >Videos instead of cmd=cd *.avi *.mkv *.wmv *.mp4 *.mov in the em_Videos command if you want.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
slishnevsky
Junior Member
Junior Member
Posts: 5
Joined: 2023-12-11, 02:43 UTC

Re: Why is this "Auto Switch Mode" not working?

Post by *slishnevsky »

Thanks, tuska !! Perfect !!
sa16
Senior Member
Senior Member
Posts: 217
Joined: 2021-09-10, 07:15 UTC

Re: Why is this "Auto Switch Mode" not working?

Post by *sa16 »

2petermad
No, it does not - but it works on Network Shares.
Thank you!

2tuska, 2slishnevsky
cm_DirBranch,em_Videos|cm_SrcAllFiles
You can still like this:
cm_DirBranch,cd "*.avi *.mkv *.wmv *.mp4 *.mov"|cm_SrcAllFiles
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Re: Why is this "Auto Switch Mode" not working?

Post by *tuska »

2petermad & 2sa16
Thank you for the additional information. :)
Post Reply