2  …  ` |  Allows configuring any transfer settings using [ raw format ](/eng/docs/rawtransfersettings) as in an INI file. E.g. to enable preserving of directory timestamps, use ` -rawtransfersettings  PreserveTimeDirs=1  ` . The switch should come only after other parameters.   
  
Effective [ options ](/eng/docs/scriptcommand_option) : ` [ confirm
](/eng/docs/scriptcommand_option#confirm) ` , ` [ reconnecttime
](/eng/docs/scriptcommand_option#reconnecttime) ` , ` [ failonnomatch
](/eng/docs/scriptcommand_option#failonnomatch) `

XML  log elements: ` [ download ](/eng/docs/logging_xml#download) ` , ` [ rm
](/eng/docs/logging_xml#rm) ` (with ` -delete  ` )

##  Examples

    
    
    [get](https://winscp.net/eng/docs/scriptcommand_get) index.html
    
    
    [get](https://winscp.net/eng/docs/scriptcommand_get) -delete index.html about.html .\
    
    
    [get](https://winscp.net/eng/docs/scriptcommand_get) index.html about.html d:\www\
    
    
    [get](https://winscp.net/eng/docs/scriptcommand_get) public_html/index.html d:\www\about.*
    
    
    [get](https://winscp.net/eng/docs/scriptcommand_get) *.html *.png d:\www\*.bak

_Advertisement_

    
    
    [get](https://winscp.net/eng/docs/scriptcommand_get) -filemask=*.html -resumesupport=on *

##  Converting to .NET Assembly

When [ converting script to .NET Assembly ](/eng/docs/library_from_script) ,
map ` get ` command to ` [ Session.GetFiles
](/eng/docs/library_session_getfiles) ` method.

Parameters mapping: Command parameter ` file ` maps to method parameter `
remotePath ` . When multiple source file parameters are used, you need to call
` Session.GetFiles ` multiple times. Command parameter ` directory\newname `
maps to method parameter ` localPath ` . You have to [ convert relative paths
to absolute paths ](/eng/docs/library_from_script#paths) .

Switches mapping:

Switch  |  Mapping   
---|---  
` -delete ` |  Value ` true ` ( ` $True ` in PowerShell) for method parameter ` remove ` .   
` -latest ` |  See [ Downloading the most recent file ](/eng/docs/script_download_most_recent_file) .   
` -resume `  
` -append `  
` -preservetime `  
` -nopreservetime `  
` -transfer `  
` -filemask `  
` -resumesupport `  
` -speed=<kbps> ` |  [ Converting transfer settings scripting switches ](/eng/docs/library_from_script_transfer_settings) to .NET assembly class ` TransferSettings ` .   
` -neweronly ` |  Not supported. Use ` [ Session.SynchronizeDirectories ](/eng/docs/library_session_synchronizedirectories) ` instead.   
  
To emulate the ( [ default ](/eng/docs/scripting#using_scripting) ) ` [ option
batch abort ](/eng/docs/scriptcommand_option) ` mode, call ` [
TransferOperationResult.Check ](/eng/docs/library_operationresultbase) ` on
method’s result. See also [ Capturing results of operations
](/eng/docs/library_session#results) .

For example, following script snippet:

    
    
    [cd](https://winscp.net/eng/docs/scriptcommand_cd) /home/martinp
    [lcd](https://winscp.net/eng/docs/scriptcommand_lcd) d:\
    ...
    [get](https://winscp.net/eng/docs/scriptcommand_get) -delete -filemask=*>1M -resumesupport=off *.txt *.xml web\

maps to following [ PowerShell ](/eng/docs/library_powershell) code:

    
    
    $transferOptions = New-Object WinSCP.[TransferOptions](https://winscp.net/eng/docs/library_transferoptions)
    # -filemask=*>1M
    $transferOptions.FileMask = "*>1M"
    # -resumesupport=off
    $transferOptions.ResumeSupport.State = [WinSCP.TransferResumeSupportState]::Off
    # Absolute paths + $True for -delete + Two calls for two source parameters
    # + calling Check on result to emulate the (default) "option batch abort" mode
    $session.GetFiles("/home/martinp/*.txt", "d:\web\", $True, $transferOptions).Check()
    $session.GetFiles("/home/martinp/*.xml", "d:\web\", $True, $transferOptions).Check()

  1. Applies for individual files transfers only. It does not skip transfer of fully transferred files. For that, combine the switch with ` -ne