Menu

Read-SasFile

Andreas Menrath
NAME
    Read-SasFile

SYNOPSIS
    Transfers a file from a remote SAS workspace to 
    your local file system.

SYNTAX
    Read-SasFile [-Workspace] <PSObject> 
    [<CommonParameters>]

    Read-SasFile [[-FromFileRef] <PSObject>] 
    [<CommonParameters>]

    Read-SasFile [-To] <String> [<CommonParameters>]

    Read-SasFile [[-Binary] [<SwitchParameter>]] 
    [<CommonParameters>]

    Read-SasFile [[-Bulk] [<SwitchParameter>]] 
    [<CommonParameters>]

    Read-SasFile [[-From] <String>] 
    [<CommonParameters>]


DESCRIPTION



PARAMETERS
    -Workspace <PSObject>
        SAS.Workspace object

        Required?                    true
        Position?                    0
        Default value                
        Accept pipeline input?       true (ByValue)
        Accept wildcard characters?  false

    -FromFileRef <PSObject>
        Use a SAS.Fileref as the remote location.
        This way you cannot only use the file system 
        on the remote SAS workspace but also the 
        wide range of SAS device types, like PIPE, 
        TEMP, DUMMY, PRINTER, ... (see SAS 
        documentation for details)

        Required?                    false
        Position?                    1
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

    -To <String>
        file path on local file system

        Required?                    true
        Position?                    2
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

    -Binary [<SwitchParameter>]
        Switch if the file to be transferred is 
        binary (or text). Text files are transcoded 
        during the transfer. Binary files are copied 
        byte by byte.

        Required?                    false
        Position?                    3
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

    -Bulk [<SwitchParameter>]
        Switch if the file is huge and should be 
        transferred in blocks. Use this switch if 
        the remote file is larger than 20MB.

        If the option is not set then the whole file 
        is loaded into memory before it is written 
        to the local file system.

        Required?                    false
        Position?                    4
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

    -From <String>
        file path on the remote server

        Required?                    false
        Position?                    1
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

    <CommonParameters>
        This cmdlet supports the common parameters: 
    Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, 
    WarningVariable,
        OutBuffer and OutVariable. For more 
    information, see 
        about_CommonParameters 
    (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS






OUTPUTS






NOTES




    --------------  Example 1  --------------

    PS C:\> Read-SasFile $ws -from 
    "C:\remote\image.gif" -to "C:\local\image.gif" 
    -binary


    transfers an image file

    --------------  Example 2  --------------

    PS C:\> Read-SasFile $ws -from 
    "/usr/remote/test.log" -to "C:\local\test.log"


    transfers a text file. The encoding of the file 
    is transcoded during the file transfer.

    --------------  Example 3  --------------

    PS C:\> Read-SasFile $ws -from 
    "C:\remote\video.avi" -to "C:\local\video.avi" 
    -binary -bulk


    transfers a huge video file


RELATED LINKS

Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.