Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 8583

Files of the day

$
0
0

I need to check a network share for specific files and save the list unto a text file, BUT how do I ensure I only pick the files of the day? My scripts is as following:

$DateStamp = (get-date).ToString('ddMMyyyy')
$Outfile = "\\xxx.xxx.xxx.xxx\C$\NG_auto_project\" + $DateStamp + "_GetFasta.txt"
$Dir = get-childitem I:\ -recurse
$List = $Dir | where {$_.extension -eq ".fasta"}
$List |ft fullname |out-file $Outfile -Append

Thanks guys!


Viewing all articles
Browse latest Browse all 8583

Trending Articles