Page 1 of 1

Allow entering folders inside archives via cd command

Posted: 2018-01-17, 16:36 UTC
by MVV
Currently cd command doesn't allow entering archive folders, i.e. this doesn't work:

Code: Select all

cd D:\test.zip\Folder\
Please make it possible, also for cd command via WM_COPYDATA.

(Currently it seems to be working when we're already in this archive, but it doesn't work in general case.)

Posted: 2018-01-17, 17:31 UTC
by Dalai
This might be difficult to do with archives that don't contain directories but relative paths. See the code blocks in this post in the German forum for an example. The upper block contains some directories, the lower one doesn't (only relative paths to the files within the archive). The thread itself is about the TC search and why it doesn't find some directories in ZIP files, but my guess is that your suggestion would pose a similar problem/issue.

Regards
Dalai

Posted: 2018-01-17, 17:45 UTC
by petermad
Until this is implementet you can do this:

Make two external commands
[em_zipfolder1]
cmd=cd D:\test.zip

[em_zipfolder2]
cmd=cd folder

And then make a button or a command that combines the two:

cmd=em_zipfolder1,em_zipfolder2

This works due to the facts that once yiou are inside a zip file cd works for folders again

Posted: 2018-05-08, 06:04 UTC
by MVV
With 9.20b1 using IgnoreDirErrors=1 it is really confusing: it looks like TC have entered an archive but an error is displaying instead of archive folder contents, and TC is unable to go level up. TC should try opening an archive and then change directory...

Posted: 2018-05-08, 09:54 UTC
by ghisler(Author)
With IgnoreDirErrors=1, TC just sees that
D:\test.zip\Folder\
isn't a valid directory, so it shows the error instead of acting on it.

Posted: 2018-05-08, 11:16 UTC
by MarcinW
Support for MVV's vote.

Posted: 2018-05-09, 08:00 UTC
by DrShark
By email I suggested additional IgnoreDirErrors values to ignore errors separately for dirs that have access denied error and dirs that don't exsist. Maybe such additional value could be a good solution to define behavior for archives too?

To make it fully customizable, I also suggested additional values to tell TC to ignore arrors with or without error messages (like access denied or path not found, so after TC may either go directly to such dir ignoring an error, or after showing an error message). Currenly it's possible to see such a difference with IgnoreDirErrors=1 by trying e.g.
cd %windir%\ServiceProfiles\LocalService - go directly to a dir with <Read error!>
cd %windir%\ServiceProfiles\LocalService\ - go to a dir with <Read error!> if NOT to choose "As Administrator" in elevation request (at least that's how it behaves here on Vista.)

Posted: 2018-05-09, 13:30 UTC
by MarcinW
DrShark wrote:Maybe such additional value could be a good solution to define behavior for archives too?
I don't think it's a good idea. It's better to spent some time and implement entering into archives (since it's a desired and useful feature) than spent some time and implement a workaround for lacking functionality...

Some notes on MVV's idea:
- a time of operation is not critical when parsing "cd" paths
- TC already parses "cd" paths, since it goes to the file defined at the end of the path
- it would be enough to parse all parts of the path (separated by ""), and than check if it is a folder, an archive file or a normal file.

Regards