Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > File Transfer

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 04-15-2016, 02:42 PM
BobW BobW is offline
Registered User
 
Join Date: Feb 2008
Posts: 53
SFXCL - List?

Hi Folks -

I don't see any references to 'ls' or 'dir' within the SFX command line reference. Is this possible via the command line?

Thanks!

Bob
Reply With Quote
  #2  
Old 04-15-2016, 03:04 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,099
See the /LIST directive...

sfxcl version 8.0.0 (x64 build 1055)
SSH2Core version 8.0.0.1055

sfxcl [options] source [source [...]] destination
sfxcl [options] /Move source [source [...]] destination
sfxcl [options] /QuickSync localpath sessionpath remotepath direction [no-subdir]
sfxcl [options] /Synchronize syncsessionname
sfxcl [options] /Delete remotesource [remotesource [...]]
sfxcl [options] /Rename remotesource [remotesource [...]] newname
sfxcl [options] /List remotesource [remotesource [...]]
sfxcl [options] /Chmod octal-mode remotesource [remotesource [...]]

  source                A URL, localpath, or /S sessionpath remotepath
  destination           A URL, localpath, or /S sessionpath [remotepath]
  remotesource          A URL or /S sessionpath remotepath
  localpath             Path on the local filesystem
  sessionpath           Session database path for host information
  remotepath            Path on the remote file system
  direction             upload | download | mirror-both | mirror-local |
                        mirror-remote
  no-subdir             Turn off recursive copying of sub-directories
  syncsessionname       Session name from synchronize database
  newname               New filename on the remote file system

Options:
  /AcceptHostKeys       Automatically accept host keys
  /Command command      Sends the specified quote command to the FTP server
  /DefaultType type     Transfer type used for undefined file extensions
                        (type = binary | ascii | prompt)
  /F path               Specifies the location of the SecureFX
                        configuration folder
  /I file               Identity to use with public-key authentication
  /Log file             Log output to the specified file
  /NoPrompt             Fail if prompted for user input
  /Overwrite action     Action to take when a filename collision occurs
                        (action = always | never | older | prompt | resume)
  /P passphrase         Passphrase to use for public-key authentication
  /Password password    Password to use for password authentication
  /Q                    Prevents output to the console window
  /RetryCount count     Maximum attempts to re-establish a connection
                        (count = 0..32767 | infinite)
  /RetryDelay seconds   Time to wait between connection retries
Examples:
(using a saved session named "MySession")

    SFXCL /Log SFXCL_LogFile.txt /List /S MySession remote/path/to/list

(PowerShell CLI, using an ad hoc connection with public key authentication where passphrase is "un10ckm3!" (PowerShell CLI requires escaped "!" char) -- and SSH2/SFTP server is listening on port 2222)
    sfxcl /NOPROMPT /I $env:USERPROFILE\Documents\Certificates\id_rsa /P "un10ckm3`!" /LIST sftp://user@192.168.232.220:2222/.

(Same as above, but in CMD instead of PowerShell)
    sfxcl /NOPROMPT /I %USERPROFILE%\Documents\Certificates\id_rsa /P "un10ckm3!" /LIST sftp://user@192.168.232.220:2222/.

--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support

Last edited by jdev; 11-02-2021 at 03:58 PM.
Reply With Quote
  #3  
Old 04-18-2016, 09:37 AM
BobW BobW is offline
Registered User
 
Join Date: Feb 2008
Posts: 53
SFXCL - List?

Thanks Jake!

I must not have the latest & greatest version of the command line reference. I first checked my reference and then the forums but still couldn't find it.

Appreciate your help!

Bob

Reply With Quote
  #4  
Old 04-18-2016, 09:42 AM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,099
Quote:
Originally Posted by BobW View Post
I must not have the latest & greatest version of the command line reference. I first checked my reference and then the forums but still couldn't find it.
Probably the fastest resource is to simply type "sfxcl" or "sfxcl /?" at the CMD prompt, and you'll get the help message listing the options that I quoted earlier.

FYI.
--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
Reply With Quote
  #5  
Old 04-18-2016, 09:58 AM
BobW BobW is offline
Registered User
 
Join Date: Feb 2008
Posts: 53
SFXCL - List?

Thanks Again Jake -

I took that for a spin and here's what I see:

C:\PROGRA~1\VanDyke Software\SecureFX>sfxcl
sfxcl version 7.3.6 (x64 build 963)
SSH2Core version 7.3.0.963

sfxcl [options] source [source [...]] destination
sfxcl [options] /Move source [source [...]] destination
sfxcl [options] /QuickSync localpath sessionpath remotepath direction [no-subdir
]
sfxcl [options] /Synchronize syncsessionname
sfxcl [options] /Delete remotesource [remotesource [...]]
sfxcl [options] /Rename remotesource [remotesource [...]] newname
sfxcl [options] /List remotesource [remotesource [...]]
sfxcl [options] /Chmod octal-mode remotesource [remotesource [...]]

source A URL, localpath, or /S sessionpath remotepath
destination A URL, localpath, or /S sessionpath [remotepath]
remotesource A URL or /S sessionpath remotepath
localpath Path on the local filesystem
sessionpath Session database path for host information
remotepath Path on the remote file system
direction upload | download | mirror-both | mirror-local |
mirror-remote
no-subdir Turn off recursive copying of sub-directories
syncsessionname Session name from synchronize database
newname New filename on the remote file system

Options:
/AcceptHostKeys Automatically accept host keys
/Command command Sends the specified quote command to the FTP server
/DefaultType type Transfer type used for undefined file extensions
(type = binary | ascii | prompt)
/F path Specifies the location of the SecureFX
configuration folder
/I file Identity to use with public-key authentication
- List?
/Log file Log output to the specified file
/NoPrompt Fail if prompted for user input
/Overwrite action Action to take when a filename collision occurs
(action = always | never | older | prompt | resume)
/P passphrase Passphrase to use for public-key authentication
/Password password Password to use for password authentication
/Q Prevents output to the console window
- Rename?
/RetryCount count Maximum attempts to re-establish a connection
(count = 0..32767 | infinite)
/RetryDelay seconds Time to wait between connection retries

While I see the List option in the examples, I don't see it in the options detail and Rename appears to be missing as well. Maybe this is just a quirk with the version I'm running? It would be nice to have examples of each and have all the detail for each option listed as well.

No matter how you slice it, I wasn't aware you could prompt command line so I've learned something new today!
Reply With Quote
  #6  
Old 04-18-2016, 11:02 AM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,099
Bob,

[options] come before actions in the SFXCL command line syntax.

/List is not listed under [options] because it's an action, not an option.

/Rename (see right above /List) is also an action, not an option.

SFXCL's usage help statement only lists options under the Options: heading. Actions are all listed above, and are mutually exclusive (e.g. you can't do a LIST and a RENAME in the same SFXCL instance).

Does this help clarify for you?

--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
Reply With Quote
  #7  
Old 04-18-2016, 11:52 AM
BobW BobW is offline
Registered User
 
Join Date: Feb 2008
Posts: 53
SFXL - List?

Thanks Jake -

Your explanation makes that much clearer for me.


Take Care,

Bob

Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 07:01 AM.