Quantcast
Viewing all articles
Browse latest Browse all 34890

PowerTip: Use PowerShell to Copy Files

Summary: Learn how to use Windows PowerShell to copy files from one location to another.

Image may be NSFW.
Clik here to view.
Hey, Scripting Guy! Question
 How can I use Windows PowerShell to copy a file to a new location?

Image may be NSFW.
Clik here to view.
Hey, Scripting Guy! Answer
 Use the Copy-Item cmdlet and specify the path to the original file and a destination for the copy. In this example, file 20110314.log in the C:\fso folder is copied to folder C:\fsox with the new name mylog.log.

Note   The destination folder C:\fsox must exist.

Copy-Item -Path C:\fso\20110314.log -Destination c:\fsox\mylog.log

Image may be NSFW.
Clik here to view.

Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 34890

Trending Articles