I'm wondering whether it's possible using PowerShell to rename a file based on it's extension and age!?
To explain in a little more detail. I have a folder which contains a number of files called "Text.dll.Date.RandomNumbers.old" however, I only want to rename the latest version of these files. I'm sure there must be a way around it!?
I'm thinking it starts with "get-childItem "\\FileLocation\*.old |........"?
Turns out you can do this by using the following codeCode:gci path | sort LastWriteTime | select -last 1
There are currently 1 users browsing this thread. (0 members and 1 guests)