Copy-AdsFile

SYNOPSIS

Uploads / Downloads files from/to TwinCAT target.

SYNTAX

NetId (Default)

Copy-AdsFile [-Path] <String> [[-Destination] <String>] [-Directory <PathSpecifier>] [-Upload] [-Force]
 [-NetId <AmsNetId>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Route

Copy-AdsFile [-Path] <String> [[-Destination] <String>] [-Directory <PathSpecifier>] [-Upload] [-Force]
 -InputObject <IRoute> [-ProgressAction <ActionPreference>] [<CommonParameters>]

AddressStr

Copy-AdsFile [-Path] <String> [[-Destination] <String>] [-Directory <PathSpecifier>] [-Upload] [-Force]
 -Address <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]

SessionId

Copy-AdsFile [-Path] <String> [[-Destination] <String>] [-Directory <PathSpecifier>] [-Upload] [-Force]
 -SessionId <Int32> [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

This Cmdlet implements ADS file transfer operations with TwinCAT Systems.

EXAMPLES

EXAMPLE 1

PS > Copy-AdsFile -address  CX_00001 -path CurrentConfig.xml -Destination c:\tmp\Config1.xml -Directory BootDir

Downloads the the CurrentConfig.xml from the BootDir of the target system to 'c:\tmp\Config1.xml'

EXAMPLE 2

PS > Copy-AdsFile -address CX_00001 -upload -path c:\tmp\Config1.xml -destination CurrentConfig.xml -Directory BootDir

Uploads the file "c:\tmp\Config1.xml" on local system to the Target BootFolder of system CX_00001

EXAMPLE 3

PS > Copy-AdsFile -address CX_0001 -path c:\ReadMe.txt -destination d:\tmp\

Downloads the File "C:\ReadMe.txt" form System CX_0001 to the local system and store it under d:\tmp\ReadMe.txt

PARAMETERS

-Path

The source path specifier, where the file is taken from.

If this Cmdlet is in Download mode, this is the specifier or FullPath of the (remote) file, dependant of the StandardFolder Parameter.

In case of 'Uploading' this is the FullPath of the file to be transferred.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Destination

The Destination path/specifier, where the file is stored.

If the Cmdlet is in Download mode, this has to be the FullPath of the target location.

In case of 'Uploading' this can be the FileName or a FullPath dependent of the StandardDirectory Parameter.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Directory

The Directory specifier on the remote system.

The Default is "Generic".

Possible values: Generic, BootDir, TargetDir, ConfigDir, InstallDir, RepositoryDir, UserPath1, UserPath2, UserPath3, UserPath4, UserPath5, UserPath6, UserPath7, UserPath8, UserPath9

Type: PathSpecifier
Parameter Sets: (All)
Aliases:
Accepted values: Generic, BootDir, TargetDir, ConfigDir, InstallDir, RepositoryDir, UserPath1, UserPath2, UserPath3, UserPath4, UserPath5, UserPath6, UserPath7, UserPath8, UserPath9

Required: False
Position: Named
Default value: Generic
Accept pipeline input: False
Accept wildcard characters: False

-Upload

Switches the Cmdlet to Upload mode.

If not set, the Cmdlet is in 'Download' mode.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Force

Forces to create the Directory on the target side (and overwrites any preexisting file).

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-NetId

The address (AmsNetId) of the system where the file is Downloaded from / Uploaded to (Default: Local)

Type: AmsNetId
Parameter Sets: NetId
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject

The address (Route) of the system where the file is Downloaded from / Uploaded to (Default: Local)

Type: IRoute
Parameter Sets: Route
Aliases: Route

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Address

The address of the system where the file is Downloaded from / Uploaded to (Default: Local) This can be the RouteName, NetId, the HostName or the IPAddress.

Type: String
Parameter Sets: AddressStr
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-SessionId

The target system address is derived from the Session Information where the file is Downloaded from / Uploaded to.

Type: Int32
Parameter Sets: SessionId
Aliases: Id

Required: True
Position: Named
Default value: -1
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

TwinCAT.IRoute

The address (Route) of the system where the file is Downloaded from / Uploaded to (Default: Local)

OUTPUTS

NOTES