Powershell one-line script to remove the bracketed date from filenames

Get-ChildItem -Recurse | Where-Object { $_.Name -match " ?\(\d\d\d\d_\d\d_\d\d \d\d_\d\d_\d\d UTC\)" } | Rename-Item -NewName { $_.Name -replace " ?\(\d\d\d\d_\d\d_\d\d \d\d_\d\d_\d\d UTC\)", ""}
Removes the annoying filehistory filename default of adding a really long UTC time and date string to every single file. Non recursive so you will have to run this per directory.

0
2020-04-17 20:20:44

What Others Think

That worked very efficiently. Thanks much for the help. whatsapp sniffer
sniffer · 52 weeks and 1 day ago
the script article soo helpful in coding and have a visit with gbwhatsapp apk
monaa · 51 weeks and 5 days ago
There are many websites for you to find places you need to visit, but you should visit this site. I think you will not be disappointed. mapquest driving directions
pikachu88 · 48 weeks ago
It was good information that I can get to know from here. It was very helpful to me. Hostsailor Thanks a lot for sharing this much information regarding this. I expect more such articles from you in the coming days.
zaiyamariya · 41 weeks ago
Don’t know how to do academic assignments? Go to [url=https://qweetly.com] https://qweetly.com [/url] and have a look at samples of A-winning assignments. They are free.
GraceJordan · 40 weeks and 2 days ago
Hi, very interesting post. This is really great stuff. Thank you for sharing. GHD Sports for Android
GHDSPORTS · 38 weeks and 3 days ago
Great article! word to pdf help me so much
emmajoe · 35 weeks and 6 days ago
rubbish removal UK
saeed20 · 35 weeks and 5 days ago
great content! will recommend this site to my friends
looneyhans · 28 weeks and 5 days ago
thanks for this learned alot sandblastingtulsaok.com
looneyhans · 24 weeks and 1 day ago
very impressive! weddingphotographerspalmsprings.com
Killersmile · 23 weeks and 5 days ago
This is really great stuff word unscrambler
minayang · 22 weeks and 2 days ago
wow never knew about this before, thanks for sharing! laser hair removal
idasanka · 19 weeks and 4 days ago
house cleaning tyler tx How can I get more infos about that products
yeoyeo · 17 weeks and 6 days ago
thank you for this! really appreciate you doing this pray
sammm · 14 weeks and 5 days ago
Truly, this article is really one of the very best in the history of articles. I am a antique ’Article’ collector and I sometimes read some new articles if I find them interesting. And I found this one pretty fascinating and it should go into my collection. Very good work! Leads
seomind12 · 11 weeks and 2 days ago
I love the way you write and share your niche! Very interesting and different! Keep it coming! PVC ramen en deuren
seomind12 · 11 weeks and 2 days ago
Thumbs up guys your doing a really good job. Website laten maken
seomind12 · 11 weeks and 2 days ago
I will be interested in more similar topics. i see you got really very useful topics , i will be always checking your blog thanks Ramen en deuren
seomind12 · 11 weeks and 2 days ago
Wow what a Great Information about World Day its exceptionally pleasant educational post. a debt of gratitude is in order for the post. Zonnepanelen kopen
seomind12 · 11 weeks and 2 days ago
This was among the best posts and episode from your team it let me learn many new things. Vakantiehuis
seomind12 · 11 weeks and 2 days ago
You completed certain reliable points there. I did a search on the subject and found nearly all persons will agree with your blog. Beste zonnepanelen
seomind12 · 11 weeks and 2 days ago
Your music is amazing. You have some very talented artists. I wish you the best of success. Aluminium ramen en deuren
seomind12 · 11 weeks and 2 days ago
Wow what a Great Information about World Day its exceptionally pleasant educational post. a debt of gratitude is in order for the post. Webdesigner
seomind12 · 11 weeks and 2 days ago
Truly, this article is really one of the very best in the history of articles. I am a antique ’Article’ collector and I sometimes read some new articles if I find them interesting. And I found this one pretty fascinating and it should go into my collection. Very good work! Zonnepanelen kopen
seomind12 · 11 weeks and 2 days ago
Thanks for the update and quick reply. I'll be sure to keep an eye on this thread. Looking for the same issue. Bumped into your thread. Thanks for creating it. Looking forward for solution. www.myprepaidcenter.com
Richlandd · 10 weeks and 1 day ago
Thanks for the update and quick reply. I'll be sure to keep an eye on this thread. Looking for the same issue. Bumped into your thread. Thanks for creating it. Looking forward for solution. www.myprepaidcenter.com
Richlandd · 10 weeks and 1 day ago
I got lost good thing I found this site! hearing aids sioux falls
aegyjingoo · 5 weeks and 5 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: