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

Bugs and other issues or requests which have been resolved.
Post Reply
Message
Author
HansS
Posts: 36
Joined: 08.02.2014, 11:34

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

#1 Post by HansS » 27.05.2019, 00:16

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)
Win7-64-ULT

User avatar
ralfso
Posts: 812
Joined: 31.10.2007, 18:21
Location: Gifhorn, Germany

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

#2 Post by ralfso » 27.05.2019, 12:39

Hello Hans,

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

Win10 (64-bit), Intel i7-2600 (3,4 GHz), 8 GB Ram, 500 GB SSD, 2x2000 GB HD, NVIDIA GeForce 545

HansS
Posts: 36
Joined: 08.02.2014, 11:34

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

#3 Post by HansS » 27.05.2019, 14:35

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.
Image

HansS
Posts: 36
Joined: 08.02.2014, 11:34

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

#4 Post by HansS » 27.05.2019, 19:41

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.

HansS
Posts: 36
Joined: 08.02.2014, 11:34

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

#5 Post by HansS » 28.05.2019, 16:56

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
  WScript.quit(1)
elseif WScript.Arguments.Count>1 then
  MsgBox "Only one parameter allowed", vbOKOnly, WScript.ScriptName
  WScript.quit(1)
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
    WScript.quit(1)
  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.

Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests