MentDB, The digital brain.  About us Home
Back / All functions / SFTP

All remote protocols.

sftp connectsftp cdsftp lcdsftp pwdsftp lpwdsftp mkdirsftp lssftp renamesftp homesftp versionsftp putsftp getsftp rmsftp rm dirsftp disconnectsftp disconnect all

sftp connect <sessionId> <jsonObject>

Description

    Connect to a SFTP server.

Parameters

    sessionId:   The session id - string - required
    jsonObject:   The json object information - string - required
admin
sftp connect "session1" {cm get "demo_cm_sftp";}
mentdb
1

sftp cd <sessionId> <directory>

Description

    Go to another remote directory.

Parameters

    sessionId:   The session id - string - required
    directory:   The remote directory - string - required
admin
sftp cd "session1" "/remote/dir"
mentdb
1

sftp lcd <sessionId> <directory>

Description

    Go to another local directory.

Parameters

    sessionId:   The session id - string - required
    directory:   The local directory - string - required
admin
sftp lcd "session1" "/local/dir"
mentdb
1

sftp pwd <sessionId>

Description

    Get the current remote directory.

Parameters

    sessionId:   The session id - string - required
admin
sftp pwd "session1"
mentdb
/remote/dir

sftp lpwd <sessionId>

Description

    Get the current local directory.

Parameters

    sessionId:   The session id - string - required
admin
sftp lpwd "session1"
mentdb
/local/dir

sftp mkdir <sessionId> <directory>

Description

    Create a remote directory.

Parameters

    sessionId:   The session id - string - required
    directory:   The remote directory - string - required
admin
sftp mkdir "session1" "/remote/dir"
mentdb
1

sftp ls <sessionId> <fileFilterPath>

Description

    Get all files into the current remote directory.

Parameters

    sessionId:   The session id - string - required
    fileFilterPath:   The file filter path - string - required
admin
sftp ls "session1" "*"
mentdb
[]

sftp rename <sessionId> <oldFile> <newFile>

Description

    Rename a remote file or directory.

Parameters

    sessionId:   The session id - string - required
    oldFile:   The old file path - string - required
    newFile:   The new file path - string - required
admin
sftp rename "session1" "file1" "file2"
mentdb
1

sftp home <sessionId>

Description

    Get home.

Parameters

    sessionId:   The session id - string - required
admin
sftp home "session1"
mentdb
/home/dir

sftp version <sessionId>

Description

    Get protocol server version.

Parameters

    sessionId:   The session id - string - required
admin
sftp version "session1"
mentdb
3

sftp put <sessionId> <localFile> <remoteFile> <mode>

Description

    Upload a file.

Parameters

    sessionId:   The session id - string - required
    localFile:   The local file path - string - required
    remoteFile:   The remote file path - string - required
    mode:   The mode (OVERWRITE | APPEND | RESUME) - string - required
admin
sftp put "session1" "file1" "file2" "RESUME"
mentdb
1

sftp get <sessionId> <remoteFile> <localFile>

Description

    Download a file.

Parameters

    sessionId:   The session id - string - required
    remoteFile:   The remote file path - string - required
    localFile:   The local file path - string - required
admin
sftp get "session1" "remoteFile1" "localFile2"
mentdb
1

sftp rm <sessionId> <remoteFile>

Description

    Remove a remote file.

Parameters

    sessionId:   The session id - string - required
    remoteFile:   The remote file path - string - required
admin
sftp rm "session1" "remoteFile1"
mentdb
1

sftp rm dir <sessionId> <remoteDir>

Description

    Remove a remote directory.

Parameters

    sessionId:   The session id - string - required
    remoteDir:   The remote directory path - string - required
admin
sftp rm dir "session1" "remoteDir1"
mentdb
1

sftp disconnect <sessionId>

Description

    Disconnect a session.

Parameters

    sessionId:   The session id - string - required
admin
sftp disconnect "session1"
mentdb
1

sftp disconnect all

Description

    Disconnect all sessions.

admin
sftp disconnect all
mentdb
0




© 2012 - 2019 - Innov-AI.