Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Copy a file and time it.

Posted on 2011-09-21
1
Medium Priority
?
453 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 14

Accepted Solution

by:
athomsfere earned 2000 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 You Ready for GDPR?

With the GDPR deadline set for May 25, 2018, many organizations are ill-prepared due to uncertainty about the criteria for compliance. According to a recent WatchGuard survey, a staggering 37% of respondents don't even know if their organization needs to comply with GDPR. Do you?

Question has a verified solution.

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

The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

730 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