open multiple tab from command line
-
- Posts: 6
- Joined: 05.08.2012, 18:23
open multiple tab from command line
I have free commander XE version 591 public preview. I want to open multiple tabs in the left pane from the command line. in the FAQ there is only a way to open a single tab. I have tried concatenating the different paths in the /L= options but have no success
Re: open multiple tab from command line
You can do it with AutoHotkey or Powerpro, actually, but you have to do a few tricks (such as send the hotkey to FC for "Open New Tab" and then "Go To Folder". If you want to do it via commandline, you have to send the commandline multiple times, but it won't create a new tab, I think. If you put this into a batch file, it should open all three folders in your FC.
SET LOCAL
SET fc =c:\freecommanderxe\freecommander.exe
%fc% /L = "c:\my folder\somefolder"
%fc% /L = "c:\my folder\someotherfolder"
%fc% /L = "c:\another folder\yet another folder"
Also, look here: viewtopic.php?f=6&t=3811
SET LOCAL
SET fc =c:\freecommanderxe\freecommander.exe
%fc% /L = "c:\my folder\somefolder"
%fc% /L = "c:\my folder\someotherfolder"
%fc% /L = "c:\another folder\yet another folder"
Also, look here: viewtopic.php?f=6&t=3811
(Windows 10-1909 Professional 64bit)
-
- Posts: 6
- Joined: 05.08.2012, 18:23
Re: open multiple tab from command line
The batch script you posted does not work. it opens the first instance of FreeCommander, but then the second command is executed only AFTER the first command has ended, that means you close the instance of FreeCommander already running.
I have tried to set the Freecommander options to have only one instance running at any time, then i Have modified your batch script to run FreeCommander using the START command
This does not work to. THe instance of FreeCommander is only one, but after the first command, the second command will change the current open tab to the new tab instead of opening a new tab with the new folder.
The AutoHotkey scripts you pointed me to doesn't work too. The FCdir keep saying that "C does not exist", while i passed it with something like "C:\data\polimi". The FCnewtab open just a new tab without changing folder
I have tried to set the Freecommander options to have only one instance running at any time, then i Have modified your batch script to run FreeCommander using the START command
Code: Select all
START "" "%fc%" /L="c:\my folder\somefolder"
START "" "%fc%" /L="c:\my folder\someotherfolder"
The AutoHotkey scripts you pointed me to doesn't work too. The FCdir keep saying that "C does not exist", while i passed it with something like "C:\data\polimi". The FCnewtab open just a new tab without changing folder
Re: open multiple tab from command line
In the current release (597) I can open new tab with:
/T /L="c:\my folder\somefolder"
/T /L="c:\my folder\somefolder"
-
- Posts: 6
- Joined: 05.08.2012, 18:23
Re: open multiple tab from command line
Hey that works, thanks Karol!
So, to make a summary
1) Open FreeCommanderXE, go to Tools->Settings, in the "General" tab check on the "Allow only one instance (needs restart)" option. Close FreeCommanderXE
2) Use the following script to open FreeCommanderXE with user customized multiple tabs. you need to change the FreeCommander path with the one matching for you and of course the folders you want to open
You can also experiment with less sleep seconds
EDIT: "timeout 1" works for me for the following folders, because FreeCommanderXE is already open
So, to make a summary
1) Open FreeCommanderXE, go to Tools->Settings, in the "General" tab check on the "Allow only one instance (needs restart)" option. Close FreeCommanderXE
2) Use the following script to open FreeCommanderXE with user customized multiple tabs. you need to change the FreeCommander path with the one matching for you and of course the folders you want to open
Code: Select all
@echo off
SET fc="C:\software\FreeCommanderXE\FreeCommander.exe"
START "" %fc% /T /L="C:\folder1\subfolder1"
timeout 5
START "" %fc% /T /L="C:\folder2\subfolder2"
EDIT: "timeout 1" works for me for the following folders, because FreeCommanderXE is already open
Re: open multiple tab from command line
You are right about my poor batch script. I apologize for that.
Try my FCmenu.ahk script. You can open multiple folders in tabs from the commandline, that is, if you have authotkey installed. But it will open in the currently active pane, not just the left pane. I use this script myself.
viewtopic.php?f=6&t=3811&p=11227#p11227
Try my FCmenu.ahk script. You can open multiple folders in tabs from the commandline, that is, if you have authotkey installed. But it will open in the currently active pane, not just the left pane. I use this script myself.
viewtopic.php?f=6&t=3811&p=11227#p11227
(Windows 10-1909 Professional 64bit)
-
- Posts: 6
- Joined: 05.08.2012, 18:23
Re: open multiple tab from command line
I didn't understand. The FCmenu.ahk description saysBGM wrote:You are right about my poor batch script. I apologize for that.
Try my FCmenu.ahk script. You can open multiple folders in tabs from the commandline, that is, if you have authotkey installed. But it will open in the currently active pane, not just the left pane. I use this script myself.
viewtopic.php?f=6&t=3811&p=11227#p11227
As i said previously, I have tried your FCdir.ahk (may is this the script you meant?), i have called it likeAttach this script to a global hotkey! It will display a menu of all the folder paths from tabs currently open in FreeCommander. The active tabs' paths will be checkmarked for easy visual sighting. When you select the item, the path is copied to the clipboard. This works even if FC is not running.
Code: Select all
FCdir.ahk "C:\path\path2\path3"
BTW with my current solution I have problems too, because I made Windows run the script at startup automatically, to open a set of folders in multiple tabs I often use. The problem is that I have also other software running at startup of course, so I have a trade off between less sleep time which means that the script do not work because it sends the command to open a new tab before the last command (to open FreeCommander) has ended its execution, meaning it has no effect, and greater sleep times which of course increase start-up time.
I think that developers should implement this directly, so you can open multiple folders in multiple tabs with only one string of command line (like separating the folders with commas after the /L or /R or something like that). I have PDFXChange Viewer and it works like this beatifully. At startup I just run one string of command line and it is executed "in one step" when ready, without needing for arbitrary guessed sleep times.
Re: open multiple tab from command line
You could simply define the tabs with your often used folders as "Locked". Locked tabs are not closed, when the program ends and they will be opened again if you start the program.BTW with my current solution I have problems too, because I made Windows run the script at startup automatically, to open a set of folders in multiple tabs I often use
Re: open multiple tab from command line
Sorry, doing too many things at once and getting discombobulated. You found the FCdir script - that is the right one.
If there are spaces in the path of the folder, you need to enclose the path in double quotes (you probably know that).
Now, you might try playing with the delay in the script. I have a pretty fast computer.
Indeed, it opens a new tab,
then it opens the "go to folder" dialogue in FC
then it sends the path to the dialogue box.
Hmmm. It works fine for me.from the command line, after of course have installed AutoHotkey_L, but a message box pops up inside FreeCommander that says that "C does not exist" (or is not a valid path, do not remember). First a new tab is created, then folder->"Go to folder" text box appears, and then the message box previously said pops up. Maybe for me your script click on "ok" before it completely write the folder string on the text box, but I'm not sure.
If there are spaces in the path of the folder, you need to enclose the path in double quotes (you probably know that).
Now, you might try playing with the delay in the script. I have a pretty fast computer.
Indeed, it opens a new tab,
then it opens the "go to folder" dialogue in FC
then it sends the path to the dialogue box.
(Windows 10-1909 Professional 64bit)
Re: open multiple tab from command line
If you just want FC to start with particular folders open, there is an option for that you know,
go to Tools>Settings>Start Program>Start/TEMP folder
You can decide what folders to start with in each panel.
go to Tools>Settings>Start Program>Start/TEMP folder
You can decide what folders to start with in each panel.
(Windows 10-1909 Professional 64bit)
Who is online
Users browsing this forum: No registered users and 50 guests