Copy-File
PackageDeployment Module Help |
Package Deployment Module |
Copy-File Cmdlet |
Version 4.0.0.5 |
Copy-File
Synopsis
Copy Files
Syntax
Copy-File [-File] <String> [-TargetDir] <String> [[-Replace] <String>] [-ContinueOnError] [-CreateBackup] [-Recurse] [-Wow64] [[-Context] <String>] [<CommonParameters>]
Description
Use this command to copy one or more files to a destination directory. This command works in the same way as the DOS command COPY and also uses the same syntax. You can use wildcards, environment variables and all variables, such as windir, winsysdir etc.
Parameters
-Context <String> |
||||||
User: Execution under user account; logging in HKEY_CURRENT_USER, i.e. for the user. |
||||||
|
-ContinueOnError <SwitchParameter> |
||||||
Continues script execution in spite of errors in the respective command |
||||||
|
-CreateBackup <SwitchParameter> |
||||||
Creates backup files of all files updated by a copying process. |
||||||
|
-File <String> |
||||||
The source file to be installed are specified in the form of a list. Wildcards (? *) and variables can be used. |
||||||
|
-Recurse <SwitchParameter> |
||||||
This option is only used for 32 bit operations (Win9x, WinNT4.x, NT-Service, Windows 2000/XP). When using this command with the DSM Runtime Service, please read the Notes on using the DSM Runtime Service. |
||||||
|
-Replace <String> |
||||||
Always: Files with identical names in the target directory will always be replaced. |
||||||
|
-TargetDir <String> |
||||||
The specified source files are installed in the common target path. An installation in subdirectories is not possible. |
||||||
|
-Wow64 <SwitchParameter> |
||||||
By default, the PackageDeployment module assumes to run in a 64-bit PowerShell process on 64-bit systems, and therefore defaults to the 64-bit application location (if different from the 32-bit application location) for file and registry accesses. If you want to access the 32-bit counterparts (in the file system %WinDir%\SysWOW64 instead of %WinDir%\System32, in the registry HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node instead of HKEY_LOCAL_MACHINE\SOFTWARE), use the -Wow64 switch. |
||||||
|
<CommonParameters> |
For more information about common parameters, type "Get-Help about_CommonParameters". |