I want to copy two file with current time stamp with time format like this: yyyy-mm-dd-hh-mm-ss
Example: mytestfile2014-11-26-00-10-45
The folder contains many files generated by date but I only want to copy the current one.:
$currentdate=[datetime]::Today.ToString('yyyy-MM-dd')
Copy-Item "mytestfile$currentdate_.csv" -destination "d:\New Folder"
But it just won't copy any file or the error says that the file cannot be found.
Need help.--Thanks!!