This forum uses cookies. Click X button to hide this message. What is stored? / Privacy
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Bookmark to dynamic folder

 
Post new topic   Reply to topic    Total Commander Forum Index -> Total Commander (English) Printable version
View previous topic :: View next topic  
Author Message
icehockey
New Member
New Member


Joined: 23 May 2018
Posts: 1

PostPosted: Wed May 23, 2018 2:26 pm    Post subject: Bookmark to dynamic folder Reply with quote

Hi folks,

I have been searching for a while and could not find a clear answer for this problem:

I have folders that is dynamically created by a service:
C:\Apps\Node.1\Instance\a\b\Log\App_1\logfile.txt
C:\Apps\Node.2\Instance\a\b\Log\App_1\logfile.txt
C:\Apps\Node.3\Instance\a\b\Log\App_1\logfile.txt

Every time a new app is deployed, App_1 becomes App_2 so so forth. The location of the logfile is also not-deterministic (sometimes Node.1, sometimes Node.2, sometimes Node.3). This makes using hotlist not very convenience (can only go to the upper level folder Node.1, Node.2)

I want to make a shortcut/button to access these log file quickly in TC by creating a button to "cd C:\Apps\Node.1\Instance\a\b\Log\App_*\" but looks like it is not working this way.

Also if I have 3 nodes, I need to create 3 shortcut like this. It would be ideal to have a drop-down list or something similar.

Any idea on how to do this?
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35712
Location: Switzerland

PostPosted: Thu May 24, 2018 3:31 am    Post subject: Reply with quote

App_* cannot be used because it wouldn't be clear which directory is meant when there are multiple. Are you in control of the service? If yes, you could set an environment variable with the latest path name or directory name. Then you could use something like this:
cd %envpath%
or
cd C:\Apps\Node.1\Instance\a\b\Log\%envname%

Quote:
Also if I have 3 nodes, I need to create 3 shortcut like this. It would be ideal to have a drop-down list or something similar.

You could add a sub-bar and check the option to show it as a popup.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Horst.Epp
Power Member
Power Member


Joined: 06 Feb 2003
Posts: 2915
Location: Germany

PostPosted: Thu May 24, 2018 3:51 am    Post subject: Reply with quote

I would do it as follows:
Make a branch view of the root level.
This can be made with a View mode and Auto-switch.
Then select the newest file from it.
The following button selects the newest file in the active view.
Code:

TOTALCMD#BAR#DATA
cmd.exe
/k "for /f "usebackq delims=" %%f in (`dir /b /a-d /o-d`) do start "" "%%COMMANDER_EXE%%" /O /S /L="%%~ff\:" & exit"
C:\Tools\Wincmd\Icons\Down-Blue.ico
Newest File

1
-1

_________________
Windows 10 x64 Version 1803
April 2018 Update (OS Build 17134.112)
TC 9.20rc1 x64 and x86
Back to top
View user's profile Send private message
nsp
Power Member
Power Member


Joined: 04 Dec 2005
Posts: 1174
Location: Lyon (FRANCE)

PostPosted: Thu May 24, 2018 7:09 am    Post subject: Re: Bookmark to dynamic folder Reply with quote

icehockey wrote:
Hi folks,

I have been searching for a while and could not find a clear answer for this problem:

I have folders that is dynamically created by a service:
C:\Apps\Node.1\Instance\a\b\Log\App_1\logfile.txt
C:\Apps\Node.2\Instance\a\b\Log\App_1\logfile.txt
C:\Apps\Node.3\Instance\a\b\Log\App_1\logfile.txt

Every time a new app is deployed, App_1 becomes App_2 so so forth. The location of the logfile is also not-deterministic (sometimes Node.1, sometimes Node.2, sometimes Node.3). This makes using hotlist not very convenience (can only go to the upper level folder Node.1, Node.2)

I want to make a shortcut/button to access these log file quickly in TC by creating a button to "cd C:\Apps\Node.1\Instance\a\b\Log\App_*\" but looks like it is not working this way.

Also if I have 3 nodes, I need to create 3 shortcut like this. It would be ideal to have a drop-down list or something similar.

Any idea on how to do this?
You could use virtualpanel to dynamically generale the list using a autorun script. (you should familiarize to VP)


If you only need logfile.txt you could filter on logfile.txt and use branchview from C:\Apps and even add a user column to show the folder APP1 ....

These are hints using user commands:
em_gotoApps as CD C:\Apps
em_only_logfile to only see logfile.txt CD logfile.txt ( you can also create a command to reset filter em_noFilter as CD *.*)
em_buildlogfileList a command to "show logfile.trxt" or directly assign it to a button. em_gotoApps,em_only_logfile,cm_DirBranch

You can also use date ordering...
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> Total Commander (English) All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Imprint/Impressum: This site is maintained by Ghisler Software GmbH
Privacy Policy | Datenschutzerklärung | Politique de Confidentialité

Using phpBB © phpBB Group