year in file name & last modified date

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 5 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
sshree43
Posts: 33
Last visit: Wed Jul 18, 2018 8:53 am

year in file name & last modified date

Post by sshree43 »

Hi Expert,



I wanted to move item based on 'year' in the file name and last modified date in the file name

the below example year=2017 and last modified date 28/06/2017 22:00 so the remaining file will go into the archive

similarly, for the year 2017 so in the result, only 2 files will be there and remaining files will go to the archive



abc_2017.xlsx last modified date 28/06/2017 22:00

abc_2017.xlsx last modified date 27/06/2017 22:00

abc_2017.xlsx last modified date 23/06/2017 22:00

abc_2018 last modified date 28/06/2018 22:00

abc_2018 last modified date 24/06/2018 22:00

abc_2018 last modified date 23/06/2018 22:00





thanks
cody m

Re: year in file name & last modified date

Post by cody m »

[THREAD LOCKED BY MODERATOR]
It looks as though you have posted about this topic in this thread viewtopic.php?f=18&t=12712&p=68433#p68433 . Please refrain from making multiple posts about the same topic.
This topic is 5 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked