Hello all:
I am writing a script that will unzip a file located on a networked share and place the files on my local machine. The problem I am having is when the script copies the files over, the files have a modified date of today's date. How can I copy
the files locally while maintaining the modified date on the files? This is an important requirement for version control. The snippet I am referring to in my script follows:
$shell = new-object -com shell.application $zip = $shell.NameSpace("\\server\zippedFile.zip") foreach($item in $zip.items()) { $shell.Namespace("E:\Unzipped Files").CopyHere($item, 0x14) }
I have WinRar installed so if there is a better way using that, please advise.
Thanks,
jocasio