 Hello and welcome today. We are going to try and we're not gonna try we are going to bulk rename files There's a number of ways to do this. We're looking at doing it from the shell now Normally when you rename a file on a Unix or a Unix like operating systems such as Linux You would use actually the move command and just move one file to a new location or to a new name There is a command called rename that isn't installed by default on most systems But usually is in the repositories. I've done videos on that in the past today though We're gonna look at a program called Vidar I'm assuming is how you say it and it's actually if it's usually in a package called more utils So on the Debian based system you would install it with pseudo apt install more utils for more utilities I already have it installed so I'm not gonna run that but once it's installed you can run it by typing vi dir now By default if you don't have an editor set it is going to default to vi So if you want to use VIM for example, you'll want to export the variable editor capital letters VIM If you want to use Neo VIM as I do you export it as so and to make that permit You put in your RC file if you're running bash It's bash RC dot bash RC in your home directory or if it's Z shell it's dot zrc in your home directory Once you have that set you can type in vidir and if you run it in the current directory It's going to look at the files in the current directory, which I should show you real quick if I list out I've got some files here. I got some text files. I got some jpeg files And if I just type in dir or sorry vi dir, it's going to look at those It's gonna list them here and now I can start renaming them if I want in different ways So I could say okay I want to rename this one with an underscore here I'm gonna put an a at this one and then when I save and exit out of this file if I list out the files now You can see that those files were renamed, but of course if you're using a program like VIM or Neo VIM You there's other ways you can go about doing that by changing things with different shortcuts For example, I can come in here and I can hit control V to go into visual mode I can select a couple of these like so I can hit C and I can say new Text and when I hit escape it renames those and then when I exit out and save the file If I list out the files now, you can see that I have renamed those ones that I had selected and renamed now That's a quick thing you can do with it But also if you just want to look at specific files, of course you can pass it things like let's say I just want to add the jpegs in this file I can say vi dar asterisk.jpg and now it's only gonna list the jpeg files and again I can take some of these and I can rename it as image using whatever shortcuts you want And now I can list that out and you can see that the ones that I had selected I have renamed as image and the ones that I didn't change are still IMG So, yeah, it's a simple program simple script again It's in the package on most systems under more utils and then it's vi dar and you know what? I really feel like at one point I wrote a bash script that basically does this basically it would list all the files Save one list to a file open up a copy of that edit it and then I would paste the commands together So that might something I do in a future video just kind of recreate the basic functionality of this with my own little bash script So that's it. I thank you for watching films by chris.com. That's chris of the K I hope you enjoyed the tutorial. I hope you found it useful vi dar is very simple again You can use this with whatever editor you want again You just have to export capital editor and then whatever the name of your editor is and then once you edit that file and save it And exit it will then Rename those files. I thank you for watching films by chris.com. There's chris of the K There's a link in the description. I also have a patreon page linked to that in the description I hope you check that out. I thank you for your support I think you for watching your thumbs ups your comments your likes all that stuff I hope that you have a great day