Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

PowerShell - Renaming a specific file of a certain extension within a folder


Recommended Posts

Posted

Hi

 

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 |........"?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...