The quotes from the first parameter are removed, resulting in the wrong result.
The same happens when you put the command under a button, but then you can add a space before the first parameter to make it work.
The quotes are removed because when the user uses something like
cd "c:\path"
TC cannot switch to "c:\path" and has to remove the quotes.
I don't currently see how I can fix that.
ghisler(Author) wrote: 2025-04-13, 08:42 UTC
I don't currently see how I can fix that.
Perhaps like this:
If there is no wildcard in the command, remove quotes from the first quoted argument, as done currently.
If there is a wildcard in the command and the first quoted argument ends with a backslash, remove its quotes, treating it as a directory path.
If there is a wildcard in the command and the first quoted argument does not end with a backslash, don't remove its quotes but extract any leading directory path unquoted and keep the filter quoted. For example:
petermad wrote: 2025-04-13, 13:29 UTC
If the user puts a wildcard in the cd command it is reasonable to assume that he want to use cd as a filter and not as a directory change.
So, you're suggesting new functionality, incompatible with how it worked up till now and how it is described in the help?
Help wrote:
You can make a button to change directories, by specifying cd directory name as the command. You can even choose which files to show, e.g. using the command cd directory\*.txt, ...
I will try to make this work. For now you can use:
cd .\"test 1.*" "test 2.*"
There are quite a few possibilities to take into account.
The following are all valid commands which need to be handled:
cd "test 1.*" "test 2.*"
cd "c:\test\test 1.*" "test 2.*"
cd "\test\test 1.*" "test 2.*"
cd "test\test 1.*" "test 2.*"
cd "test 1.*" test2.*
cd "c:\test\test 1.*" test2.*
cd "\test\test 1.*" test2.*
cd "test\test 1.*" test2.*
cd test1.* "test 2.*"
cd c:\test\test1.* "test 2.*"
cd \test\test1.* "test 2.*"
cd test\test1.* "test 2.*"
The same with UNC paths like \\server\share
The various file URLs supported by the cd command on the command line:
file:///c:/test/
file:///c|/test/
file:///localhost/c:/test/
file:///localhost/c|/test/
file:///server/share/dir
and the same with URL-encoded characters like " "->"%20" and with 2 or 4 forward slashes.
Wildcards in the path part like cd c:\test*\test are not supported because they are ambiguous, e.g. when there is more than one path matching the pattern:
c:\test1\
and
c:\test2\