Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
$nethood$
#1
Can QM create an FTP network connection?
#2
Don't know how to add a FTP connection to $nethood$.
Windows creates a folder with target.lnk. For FTP, its target is ITEMIDLIST, not normal URL, and I don't know how to create it with QM.
Did not find API.

Can create url shortcut.
CreateInternetShortcut "$desktop$\test.url" "ftp://user@ftp.x.com"
Desktop Internet Shortcut
But it will not be integrated with Windows Explorer. Probably will open in default web browser.

This function creates shortcut to a network folder. Cannot create for FTP.
Function CreateNetworkShortcut
Code:
Copy      Help
;/
function $name $target

;Creates network shortcut in $nethood$ folder.
;Error if fails.

;EXAMPLE
;CreateNetworkShortcut "test" "\\computer\sharedfolder"


str sd.expandpath(F"$NetHood$\{name}")
if(dir(sd 2)) del- sd
mkdir sd
SetAttr sd FILE_ATTRIBUTE_READONLY 1

;if flags&1 ;;FTP/HTTP. Does not work.
,;_s=F"{sd}\t.url"
,;CreateInternetShortcut _s target
,;target=_s
if(!CreateShortcut(F"{sd}\target.lnk" target)) end "failed. Probably invalid target"

str s=
;[.ShellClassInfo]
;CLSID2={0AFACED1-E828-11D1-9187-B532F1E9575D}
;Flags=2
;
s.setfile(F"{sd}\desktop.ini")

err+ end _error


Forum Jump:


Users browsing this thread: 2 Guest(s)