User command stopped working

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
Horst.Epp
Power Member
Power Member
Posts: 6481
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: User command stopped working

Post by *Horst.Epp »

petermad wrote: 2020-06-16, 09:11 UTC 2Stefan2
Hmm, it works fine here on Windows 10...
...
For me your unmodified em_ext_swapfilenames works fine here
under actual Windows 10.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: User command stopped working

Post by *Stefan2 »

# 1

Stops with errB

%P%S1\ (ECHO errB)

Code: Select all

TOTALCMD#BAR#DATA
cmd /k
if not exist "%P" (ECHO errA) else if exist %P%S1\ (ECHO errB) else if not *%C3==* (ECHO errC) else if %C2==%T%S1 (ECHO errD) else if %C2==%P%S1 (ECHO errE) else echo Temp file for TC Extended Menu > %%TEMP%%\tc_ext.tmp && xcopy %C1 %%TEMP%%\tc_ext.tmp /H /R /K /Y && xcopy %C2 %C1 /H /R /K /Y && xcopy %%TEMP%%\tc_ext.tmp %C2 /H /R /K /Y && del %%TEMP%%\tc_ext.tmp /F /A
C:\windows\System32\imageres.dll,-68
Batch SWAP filenames


-1

- - -

# 2

That works

%P%S1\* (ECHO errB)

Code: Select all

TOTALCMD#BAR#DATA
cmd /k
if not exist "%P" (ECHO errA) else if exist %P%S1\* (ECHO errB) else if not *%C3==* (ECHO errC) else if %C2==%T%S1 (ECHO errD) else if %C2==%P%S1 (ECHO errE) else echo Temp file for TC Extended Menu > %%TEMP%%\tc_ext.tmp && xcopy %C1 %%TEMP%%\tc_ext.tmp /H /R /K /Y && xcopy %C2 %C1 /H /R /K /Y && xcopy %%TEMP%%\tc_ext.tmp %C2 /H /R /K /Y && del %%TEMP%%\tc_ext.tmp /F /A
C:\windows\System32\imageres.dll,-68
Batch SWAP filenames


-1
Two files selected > swapped filenames
One file selected > errE
Three or more files selected > errC
One or two Folder(s) selected > errB

- - -

Now that works too:

%P%S1\* (echo •)

Code: Select all

TOTALCMD#BAR#DATA
cmd /k
if not exist "%P" (echo •) else if exist %P%S1\* (echo •) else if not *%C3==* (echo •) else if %C2==%T%S1 (echo •) else if %C2==%P%S1 (echo •) else echo Temp file for TC Extended Menu > %%TEMP%%\tc_ext.tmp && xcopy %C1 %%TEMP%%\tc_ext.tmp /H /R /K /Y && xcopy %C2 %C1 /H /R /K /Y && xcopy %%TEMP%%\tc_ext.tmp %C2 /H /R /K /Y && del %%TEMP%%\tc_ext.tmp /F /A
C:\windows\System32\imageres.dll,-68
Batch SWAP filenames


-1
- - -

Tested on Microsoft Windows [Version 10.0.18363.900] - "1909" - Eng/Ger


Used test file names ("Big" and "Small" correspond to the file size):
Fiskars Sage BIGsize.png 444kb
Fiskars Sage SmallSize.png 306kb
Fiskars Sage BIGsize Größe.png 444kb german umlauts
Fiskars Säge SmallSize.png 306kb


Results, swapped filenames (note filename and filesize didn't fit anymore):
Fiskars Sage BIGsize Größe.png 314.242 03.06.2019 11:36 -a--
Fiskars Säge SmallSize.png 454.741 10.06.2020 12:34 -a--
Party Grill - KLEIN äüöß.png 454.741 10.06.2020 12:34 -a--
Party Grill GROß äüö.png 314.242 03.06.2019 11:36 -a--



HTH? :D
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: User command stopped working

Post by *petermad »

D2Stefan2
So that means that this button does NOT work for you:

Code: Select all

TOTALCMD#BAR#DATA
%COMSPEC% /K
if exist %P%S1\ (echo FOLDER) else echo FILE
%COMMANDER_EXE%,2
Test for folder or file


-1
while this one does work for you:

Code: Select all

TOTALCMD#BAR#DATA
%COMSPEC% /K
if exist %P%S1\* (echo FOLDER) else echo FILE
%COMMANDER_EXE%,2
Test for folder or file


-1

What arey your setting for:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\
and
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\
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
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: User command stopped working

Post by *Stefan2 »

2petermad

Tested on Microsoft Windows [Version 10.0.18363.900] - "1909" - Eng/Ger

Code 1 shows always "FOLDER", no matter what is selected.
Code 2 shows "FOLDER" or "FILE" depending on what is selected.

Code: Select all

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor]
"CompletionChar"=dword:00000009
"DefaultColor"=dword:00000000
"EnableExtensions"=dword:00000001
"PathCompletionChar"=dword:00000009
Same on WOW6432Node\.
No such key below of HKCU

- - -

Microsoft Windows [Version 6.1.7601] - win7 32bit - Ger

Code 1 and Code 2 shows "FOLDER" or "FILE" depending on what is selected.

Code: Select all

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor]
"CompletionChar"=dword:00000040
"DefaultColor"=dword:00000000
"EnableExtensions"=dword:00000001
"PathCompletionChar"=dword:00000040

Code: Select all

[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"CompletionChar"=dword:00000009
"DefaultColor"=dword:00000000
"EnableExtensions"=dword:00000001
"PathCompletionChar"=dword:00000009

 
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: User command stopped working

Post by *petermad »

I have:

Code: Select all

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor]
"CompletionChar"=dword:00000040
"DefaultColor"=dword:00000000
"EnableExtensions"=dword:00000001
"PathCompletionChar"=dword:00000040
and:

Code: Select all

[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"CompletionChar"=dword:00000009
"DefaultColor"=dword:00000000
"EnableExtensions"=dword:00000001
"PathCompletionChar"=dword:00000009
in BOTH windows 7 and Windows 10 - could the missing ][HKEY_CURRENT_USER\Software\Microsoft\Command Processor] be the reason why your Windows 10 behaves differently than mine? or is it some other Windows setting that makes the difference?
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
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: User command stopped working

Post by *Stefan2 »

EDIT:
arrg, I was wrong, I used the script with the "%P%S1\*"
That works, but with "%P%S1\" it still fails. Maybe I need a reboot, but this will take some time...






I imported your HKCU-export and now your original script works for me on w10 too:

Code: Select all

TOTALCMD#BAR#DATA
cmd /k
if not exist "%P" (echo •) else if exist %P%S1\* (echo •) else if not *%C3==* (echo •) else if %C2==%T%S1 (echo •) else if %C2==%P%S1 (echo •) else echo Temp file for TC Extended Menu > %%TEMP%%\tc_ext.tmp && xcopy %C1 %%TEMP%%\tc_ext.tmp /H /R /K /Y && xcopy %C2 %C1 /H /R /K /Y && xcopy %%TEMP%%\tc_ext.tmp %C2 /H /R /K /Y && del %%TEMP%%\tc_ext.tmp /F /A
C:\windows\System32\imageres.dll,-68
Batch SWAP filenames, petermad, echo dot peep


-1


 
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: User command stopped working

Post by *petermad »

Stefan2 wrote: 2020-06-16, 14:05 UTC
I imported your HKCU-export and now your original script works for me on w10 too:

Code: Select all

TOTALCMD#BAR#DATA
cmd /k
if not exist "%P" (echo •) else if exist %P%S1\* (echo •) else if not *%C3==* (echo •) else if %C2==%T%S1 (echo •) else if %C2==%P%S1 (echo •) else echo Temp file for TC Extended Menu > %%TEMP%%\tc_ext.tmp && xcopy %C1 %%TEMP%%\tc_ext.tmp /H /R /K /Y && xcopy %C2 %C1 /H /R /K /Y && xcopy %%TEMP%%\tc_ext.tmp %C2 /H /R /K /Y && del %%TEMP%%\tc_ext.tmp /F /A
C:\windows\System32\imageres.dll,-68
Batch SWAP filenames, petermad, echo dot peep


-1
The script above still has the * - what about without the *?
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
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: User command stopped working

Post by *Stefan2 »

petermad wrote: 2020-06-16, 14:19 UTC The script above still has the * - what about without the *?
You may have miss my edit above.

I picked the wrong script first, but soon realized my mistake.

So nothing really changed right now, I need more time to test with that imported reg file,
maybe that needs an reboot, which I want to avoid right now, sorry (too many apps open and arranged :D ).




 
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: User command stopped working

Post by *petermad »

which I want to avoid right now, sorry (too many apps open and arrange
I can fully understand that - no rush at all :-)
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
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: User command stopped working

Post by *Stefan2 »

2petermad

petermad wrote: 2020-06-16, 14:19 UTC The script above still has the * - what about without the *?

No, the code "if exist %P%S1\* (echo FOLDER) else echo FILE" ( from viewtopic.php?p=389345#p389345)
without the * it still doesn't work on this PC. (still have to try on another one if time permits)

Please do not do additionally work for me, as I have already my work around > viewtopic.php?p=389376#p389376


- - -

What I did:

Microsoft Windows [Version 10.0.18363.900] - Eng/Ger


I have now

Code: Select all

[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"CompletionChar"=dword:00000009
"DefaultColor"=dword:00000000
"EnableExtensions"=dword:00000001
"PathCompletionChar"=dword:00000009


I rebooted the PC

Code: Select all

TOTALCMD#BAR#DATA
%COMSPEC% /K
if exist %P%S1\ (echo FOLDER) else echo FILE
%COMMANDER_EXE%,2
Test for folder or file


-1
>>>> shows FOLDER on folder and even on files



Code: Select all

TOTALCMD#BAR#DATA
%COMSPEC% /K
if exist %P%S1\* (echo FOLDER) else echo FILE
%COMMANDER_EXE%,2
Test for folder or file


-1
>>>> shows FOLDER on folders and FILE on files




em_ext_swapfilenames "does nothing" for me,
the command put into a button with "cmd /k" shows me an dot,
with the "if exist %P%S1\*" it works for me.



If I can do some more test for you, I am here...., else I am out :D
 
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: User command stopped working

Post by *petermad »

2Stefan2
So we never foaund out why if exist xxx\ works in my Windows 10 but not yours, but since if exist xxx\* also works for me on all OS'es I have now changed that in all the .ini files in my Extended Menus (18 changes in 46 .ini files = 828 changes).

I have therefore made a silent update of the Extended menus - see: https://www.ghisler.ch/board/viewtopic.php?p=389647#p389647
Last edited by petermad on 2020-06-25, 17:08 UTC, edited 2 times in total.
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
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: User command stopped working

Post by *Usher »

2petermad
Maybe it's something related to Linux Subsystem (WSL)?
Andrzej P. Wozniak
Polish subforum moderator
Post Reply