I'm working on a first ever Powershell project and I'm fighting to climb the curve.
receive 3 zip files daily in folder: d:\shared\ftp
name convention is:
extract for each AAA* to
mdd (based on zip file name not current date) and
move current zip to d:\shared\archive
repeat until no more AAA
move to AAB, repeat steps above then AAC
I started by creating the date stamp directory with:
but this doesn't work when there is a backlog in the ftp directory as there is now.
I can identify the oldest of each file with:
dir *AAA -recurse | sort -property lastwritetime | select -first 1 | #replace with unzip
dir *AAB -recurse | sort -property lastwritetime | select -first 1 | #replace with unzip
dir *AAC -recurse | sort -property lastwritetime | select -first 1 | #replace with unzip
assuming i could replace the end with a pipe to unzip the selected file it feels close, but I'm starting to hit the learning curve hard.
Thanks in advance.