Help > Azure > blob >
get
PreviousNext

  • Overview
  • Syntax
  • Arguments
  • Notes
  • Examples
  • Overview

    downloads cloud storage file(s) to local machine

    Download ZappyShell

    Syntax

    get <SOURCE> <TARGET> [--del INPUT] [--mov INPUT]
               [--mov-folder FOLDER_PATH] [--sync] [--setdate] [--struct]
               [-y|--overwrite] [-s|--skip] [-l|--fail] [-p|--prompt] [--crfol]
               [--exclude-olderthan INPUT] [--exclude-newerthan INPUT]
               [-r|--recursive] [-c|--continue-onerror] [--auth NAME]
               [--accesskey YOUR_ACCESS_KEY] [--secretkey YOUR_SECRET_KEY]
               [--serviceurl URL] [--threads COUNT] [--consoleout FILEPATH]
               [-v|--verbose] [-w|--wait] [-i|--interactive] 
    
    Alias: dow, download
    

    Arguments

    Parameter Description
    <SOURCE>
    Source file(s) you want to download
    <TARGET>
    Target folder path where you want save downloaded file
    --del
    Delete source file(s) after successful transfer
    --mov
    Move source file(s) to archive folder after successful transfer
    --mov-folder FOLDER_PATH
    Folder path where you want to move source file(s) after successful transfer. This option only applicable if you specified --mov option. You can timestmp your archive folder path with predefined placeholders (e.g. --mov-folder c:\archive\Load_{{YYYY}}_{{MM}}_{{DD}}). Valid placeholders are [{{DD}},{{MM}},{{MON}},{{YY}},{{YYYY}},{{HH}},{{HH12}},{{HH24}},{{MI}},{{SS}},{{MS}},{{US}},{{DATAROOT}}]
    --sync
    Synchronize source files with target. Files are compared based on size and LastWriteDateUtc if both attributes same in source and target then file is skipped.
    --setdate
    Sets the target file's last-modified time to be the same as the source file's LastModifiedDate after upload or download. When target file is cloud storage file then this option sets Metadata entry rather than setting actual LastModifiedDate because storage file LastModifiedDate attribute is readonly and cannot be changed.
    --struct
    Transfer files along with folder structure. Automatically create missing folders at target location. When you specify this option no need to specify recursive option because its always recursive scan when --struct option specified.
    -y | --overwrite
    Overwrite target file(s) if exists
    -s | --skip
    Skip file transfer and continue with other files
    -l | --fail
    Throw error if target file exists
    -p | --prompt
    Prompt for action if target file exists
    --crfol
    Automatically create missing target folder
    --exclude-olderthan
    Exclude files if they are older than specified period. You may use format specifier or exact date/datetime. Period format specifiers are d,h,m or s (days, hours, minutes or seconds). Example: 5d = (5 days), 5h=(5 hours), 5m=(5 hours), 5s=5s=(5 second), "2015-12-31 11:59:59"=(exact date+time), "2015-12-31"=(exact date)
    --exclude-newerthan
    Exclude files if they are newer than specified period. You may use format specifier or exact date/datetime. Period format specifiers are d,h,m or s (days, hours, minutes or seconds). Example: 5d = (5 days), 5h=(5 hours), 5m=(5 hours), 5s=5s=(5 second), "2015-12-31 11:59:59"=(exact date+time), "2015-12-31"=(exact date)
    -r | --recursive
    Scan recursive
    -c | --continue-onerror
    Continue on error such as specified file is missing at source
    --auth NAME
    Credential entry name. This entry name must exist (previously saved using setauth command)
    --accesskey YOUR_ACCESS_KEY
    Cloud account access key
    --secretkey YOUR_SECRET_KEY
    Cloud account secret key
    --serviceurl URL
    Service url for cloud service e.g. --serviceurl https://s3-us-west-2.amazonaws.com
    --threads COUNT
    Number of concurrent operations. If you don't specify then system will use default settings to optimize transfer.
    --consoleout FILEPATH
    Captures console output and saves to file
    -v | --verbose
    Log verbosity level. -v means detailed, If you don't specify this option then minimum logging will be done.
    -w | --wait
    Wait for user input before exit
    -i | --interactive
    Continue in interactive mode after this command is completed. This switch is not applicable if you already in interactive mode

    Notes

    Examples

    Examples
    Download single file from azure blob storage

    get "mycontainer/folder2/file1.txt" "c:\localfolder1\"  
    Download single file from azure blob storage as different name

    get "mycontainer/folder2/file1.txt" "c:\localfolder1\newname_file1.txt"  
    Download multiple files from azure blob storage

    get "mycontainer/folder2/*.txt" "c:\localfolder1" 
    Download multiple files with always overwite option ON (-y). Get files from sub folders too (-r).

    get "mycontainer/folder2/*.txt" "c:\localfolder1" -y -r
    Upload full folder structure to target.

    get "c:\localfolder1\" "mycontainer/folder2" --struct -r
    Sync entire source folder/bucket to target (including folder structure). Download source files only if its newer than target file (--sync). Retain folder structure of source to target (--struct)

    get mycontainer/ "c:\data" --struct -sync
    Download only those files which are modified in last 5 days

    get mycontainer/ "c:\data"  --exclude-olderthan 5d
    Download only those files which are modified in last 10 hours

    get mycontainer/ "c:\data" --exclude-olderthan 10h
    Download only those files which are modified in last 30 minutes

    get mycontainer/ "c:\data" --exclude-olderthan 30m
    Download only those files which are modified after 2010-12-31 (just date without time)

    get mycontainer/ "c:\data" --exclude-olderthan 2010-12-31
    Download only those files which are modified after 2010-12-31 15:56:59 (date and time). Use double quotes to wrap datetime

    get mycontainer/ "c:\data" --exclude-olderthan "2010-12-31 15:56:59"
    Download files to local storage and once transferred delete from source (--del option). Overwrite target file (-y option)

    get "mycontainer\*.txt" "c:\data" --del -y
    Download files to local storage and once transferred move source file to some archive folder (--mov and --mov-folder options). Automatically create archive folder with current timestamp in YYYYMMDD format

    get "mycontainer\*.txt" "c:\data" --mov --mov-folder "mycontainer/archive/process_{{YYYY}}{{MM}}{{DD}}"


    www.zappysys.com | Products | All copyrights reserved. ZappySys LLC.