Attachment Commands
This page gives information of commands related to perform operations related to attachments
Overview
This section covers all the Keeper Commander commands for managing file attachments within vault records. These commands allow users to download, upload, or delete attachments from records in the vault. They are especially useful for tasks such as backup, organization, and maintenance.
This section supports following commands
Upload Attachments Command
Upload a new file into your vault and link it to a record. Securely adds files (e.g., documents, config files, certificates) to an existing record.
DotNet CLI
Command: upload-attachment
Parameters:
record
Keeper record path or UID
-f, --file
Path to the file to upload
Options:
--help
Display help screen
--version
Display version information
Example:
My Vault> upload-attachment record_uid -f <path_of_file>DotNet SDK
Function: UploadAttachment
Task UploadAttachment(KeeperRecord record, IAttachmentUploadTask uploadTask);Parameters:
FileName- Name of the attachment file on recordrecord Uid- UID of record to which this file is to be uploaded and attached to
Example:
var uploadTask = new FileAttachmentUploadTask(<FileName>);
//the vault instance has to be created before we call the next function
await vault.UploadAttachment(record, uploadTask); Power Commander
Command: Copy-FileToKeeperRecord
Parameters:
-Filename: Attachment name which need to be uploaded to the record-Record: Record Uid
Example:
PS> Copy-FileToKeeperRecord -Filename <path_of_the_file> -Record record_uid Python CLI
Command: upload-attachment or ua
Parameter:
PATH: record path or UID (required)--file: FILE file name to upload (required)
Example:
Python SDK
Function: upload_attachments
Arguments:
vaultVaultOnlineObject which handles the recordsrecordPasswordRecordor aTypesRecordobject.fileslist of files processed usingFileUploadTaskstop_on_errorBoolean - dictates if to stop if upload fails
Example:
Download Attachment Command
Downloads all files attached to a specified record—or entire folders if used recursively.
This command retrieves files attached to vault records and saves them to a specified local directory.
Users can download individual records or recursively fetch all attachments from a folder and its subfolders.
DotNet CLI
Command : download-attachment
Parameters:
record path or uid (pos. 0) : Required. Keeper Record-o, --output-dir: Output directory
Flag :
-f, --file: Attachment UID, name, or title--help: Display this help screen.--version: Display version information.
Example:
DotNet SDK
Download attachments or files from Keeper records to local storage. Use DownloadAttachmentFile for regular record attachments and DownloadFile for file-type records.
Function: DownloadAttachmentFile or DownloadFile based on record type
Parameters:
recordUid
string
The UID of the record containing the attachment
attachment
AttachmentFile
The attachment file object to download
fileRecord
FileRecord
The file record object to download
destination
Stream
The output stream where the file will be written
Example:
PowerCommander
Command: Copy-KeeperFileAttachment or kda
Parameters:
-Path
Yes
Output folder path where files will be downloaded
Flags:
-Record
Record UID to download attachment from
-Folder
Folder UID to download attachments from
-Name
Name of the specific file to download (use with -Record)
-Recursive
Download all attachments from the folder and subfolders
Example:
Python CLI
Command: download-attachment
Aliases: da
Parameters:
PATH: Record or folder path or UID (required)
Options:
-r, --recursive: Download recursively through subfolders--out-dir: OUT_DIR Local folder for downloaded files--preserve-dir: Preserve vault folder structure--record-title: Add record title to attachment file.
Example:
Remove Attachment Command
Deletes one or more attachments from a Keeper record.
Permanently removes an attached file from a record.
Useful for cleaning up outdated or redundant attachments and managing vault storage.
DotNet CLI
Command: delete-attachment
Flag:
record: record path or UID-h, --helpshow this help message and exit--file: NAME attachment file name or ID. Can be repeated.
Example:
PowerCommander
Command : Remove-KeeperFileAttachment
Aliases: krfa
Flag :
-Record: Record Uid-FileName: Attachment name to delete-Confirm:-Confirm: $falsewill not ask prompt.
Example:
Last updated
Was this helpful?

