Page 1 of 1

Call with /T dir /C not working if ::Computer is active

Posted: 26.05.2019, 22:16
by HansS
I start FreeCommander default with ::Computer

Then call like

C:\Tools\FreeCommanderXE\FreeCommander.exe /T C:\Users /C

does not work - new tab is ::Computer instead of "C:\Users"

If I open e.g. "C:\", same command does what it should do.

FreeCommanderXE-64-donor_portable797 (2019-04-27)

Re: Call with /T dir /C not working if ::Computer is active

Posted: 27.05.2019, 10:39
by ralfso
Hello Hans,

my FreeCommanderXE-64-donor_portable797 is opening the C:\Users-Folder like expected.

Re: Call with /T dir /C not working if ::Computer is active

Posted: 27.05.2019, 12:35
by HansS
Hello Ralf.

My "::Computer" shows mapped and subst drives, but no other special things!? Nevertheless it does not work here, see screen-shot. Would it help if I send my settings files?

PS: In the screen-shot you can see another small problem: N: mapping is shown with a red "x". Even after successful opening the drive the "x" disappears in the ::Computer list, nut not above the list.

Re: Call with /T dir /C not working if ::Computer is active

Posted: 27.05.2019, 17:41
by HansS
I had to restore my system and forgot to update FreeCommander after this :oops: - it's an old problem from 771, and Ralf is right, the problem does not exist in 797. This issue can be closed.

Re: Call with /T dir /C not working if ::Computer is active

Posted: 28.05.2019, 14:56
by HansS
For explanation why I checked the command line handling: In want to be able to open path in FreeCommander via SendTo from any other application (like Everything, 7zFM, Windows explorer and any file or dir selection dialogues). Unfortunately the options are not evaluated position independent, so e.g. this does not work:

C:\Tools\FreeCommanderXE\FreeCommander.exe /C /T C:\Users

So it's not possible to simply make a link to FreeCommander.exe with options, and I made a script which calls FreeCommander with options in the needed position:

Code: Select all

' ----------------------------------------------------------------------------
' FreeCommander-T.vbs: Start FreeCommander with parameter for use in SendTo
'   or for drag and drop
' Autor: Hans Schmidts
' ----------------------------------------------------------------------------
' History:
' 2019-05-27  HS
' - Initial revision
' Usage:
' - Copy this file "FreeCommander-T.vbs" to your FreeCommander program dir.
' - Create link to this script in SendTo, or in QuickLaunch (for d&d), e.g.
'   "C:\Users\Hans\AppData\Roaming\Microsoft\Windows\SendTo\FreeCommander-T.lnk"
' - Via context menu select icon from FreeCommander.exe for this "*.lnk".
' - Use SendTo from context menu of any dir or file to open the dir in
'   a new tab in FreeCommander.
' ----------------------------------------------------------------------------
option explicit

dim oWshShell, oFileSys, sExeName, sDirOrFileName, oFolder

Set oWshShell = WScript.CreateObject("WScript.Shell")
Set oFileSys = CreateObject("scripting.filesystemobject")

sExeName = WScript.ScriptFullName
sExeName = Replace(sExeName,"-T.vbs",".exe")

if WScript.Arguments.Count=0 then
  MsgBox "Parameter path missing", vbOKOnly, WScript.ScriptName
elseif WScript.Arguments.Count>1 then
  MsgBox "Only one parameter allowed", vbOKOnly, WScript.ScriptName
end if

sDirOrFileName = WScript.Arguments(0)

On Error Resume Next
Set oFolder = oFileSys.GetFolder(sDirOrFileName)
On Error goto 0

if VarType(oFolder)=vbEmpty then
  ' Parameter is no dir
  if not (oFileSys.FileExists(sDirOrFileName)) then
    ' .. and is no file
    MsgBox "Wrong parameter """ & sDirOrFileName & """", vbOKOnly, WScript.ScriptName
  end if
end if

' execute normal and don't wait
oWshShell.Run """" & sExeName & """ /T """ & sDirOrFileName & """ /C", 1, false

' eof
PS: I also made a script to open dirs or files in FreeCommander or Windows explorer via OpenWith Firefox plugin (we have private DokuWiki, with many file-Links to dirs and files, and want to open the files directly with associated application (open with Windows explorer does the trick), or the dirs directly in new tab in FreeCommander from Firefox.