Solved

Copy a file and time it.

Posted on 2011-09-21
1
443 Views
Last Modified: 2012-05-12
I am looking for a powershell script that I can run via a scheduled task OR run Manually that will:

Copy a file from a UNC Share to the C:\Test Directory and time how long it takes
Then I want the script to copy that same file from the C:\Test directory to the R:\data directory and time how long it takes.

Then create a report that shows how long each part took and calculate the average transfer rate.
0
Comment
Question by:brittonv
1 Comment
 
LVL 14

Accepted Solution

by:
athomsfere earned 500 total points
ID: 36577336
You could use this and modify it

$File1Start = Get-Date
Copy C:\TestDirectory C:\Destination -Recurse
$File1End = Get-Date

$File2Start = Get-Date
Copy C:\Destination C:\Destination2 -Recurse
$File2End = Get-Date

echo $File1Start
echo $File1End

echo $File2Start
echo $File2End
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will help you understand what HashTables are and how to use them in PowerShell.
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the adminiā€¦

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question