how to rename multiple files or remove specific characters on multiple files

preview_player
Показать описание
this video shows how to remove specific character from many files at once

1. For any type of characters

get-childitem *.txt | ForEach { Move-Item -LiteralPath $_.name $_.name.Replace("old","new")}

2. If file names doesn't contain square bracket.

get-childitem *.txt | foreach { rename-item $_ $_.Name.Replace("old","new") }
Рекомендации по теме
Комментарии
Автор

Dang, didn't expect this to work. Anyone coming here nowadays, here's a couple of tips:
1. Make sure you're shift + right clicking and not just normal right clicking otherwise it wont work.
2. Somewhat obvious, but replace the "new" with whatever you want it to change to, and the "old" to whatever it currently is. Keep the quotes, however, and to delete the text just leave "new" as "".
3. the .txt needs to be changed accordingly for whatever file extension name you have, like .txt, .bin, .exe, etc.

Good luck!

JosaxJaz
Автор

a million thanks!! just saved me 3 hours of work to remove a simple - from 900 files

JayTavarez
Автор

This video should be on the top of any videos available on editing the file names. Very simple and very clear.

GauravKumar-ffwg
Автор

Thanks a lot man. i have 990 items to rename, within a min i have zero now, . Thanks man

mrblue
Автор

It's works, thanks for the video guidance...

👍

jayanathanperumal
Автор

Dude holy crap this saved my hours. So sweet

jju
Автор

it still help in 2022, well done bro... can we remove initial numbers from file

shubhammuke
Автор

how can i do this with file type mkv? please help

kartikprajapat
Автор

Helped me a lot in organising my files

ashazparvez
Автор

The first step doesn't work. When Powershell opens it does not display the directory the files are in, it on displays C:\System 32 and will not change to the correct directory.

johnoxley
Автор

It Helps Me A Lot Thank You You Got A new Subscriber

highmidlow
Автор

Thank you so much, TS. It saved my day!

iamcirish
Автор

If i want to remove numbers. How to do?

MemeDilseh
Автор

Hi, may I ask is that possible for replace " by using this code?

jiachuan
Автор

I am so lost lol I have a bunch of video files .mp4 that are all titled differently and have (2) at the end of each title that I wanna batch remove. Can u tell me in steps how to do this please?

Whoaheswims
Автор

what if I want to rename folders? should I use the same command as .txt?

iskdr_zq
Автор

how can we do the same in ubuntu using python?

saivamshikrishnasarala
Автор

The filename of all my files starts with four numbers and a space, how can I remove them? I hope you can help me. Thanks

ryanf
Автор

helped me a lot to organize my mp3 files

nishatasgher
join shbcf.ru