-2

I have about 1852 video files and they all end with .br or .brx and I wanted to remove them from the file name.

What method could I use to accomplish what I asked above; to remove file extension from files with these extension characters in a batch solution to do all quickly rather than one by one?

Vomit IT - Chunky Mess Style
  • 40,038
  • 27
  • 84
  • 117
Amk
  • 31
  • 1
  • 1
    It would help if you told us what operating system you are using. – Dour High Arch Aug 21 '16 at 16:26
  • @DourHighArch i think you can guess it'd be windows and I don't think it matters much which version – barlop Aug 21 '16 at 16:27
  • No, he was actually asking if you're using Linux or Mac by any chance. – NetwOrchestration Aug 21 '16 at 16:28
  • 2
    -1 look up batch rename files and seen what comes up and tried anything and then add what you tried into your question – barlop Aug 21 '16 at 16:29
  • @AmirHossein no he didn't, he asked what OS, so that question mean just linux or mac, there are other OSs than linux and mac They're nowhere near as common but there are others – barlop Aug 21 '16 at 16:30
  • Batch scripting differs from OS to OS. Windows differs from Linux. And "What OS?" definitely doesn't mean Windows Xp or Windows 10, that would be "What Windows Edition?" – NetwOrchestration Aug 21 '16 at 16:36
  • -1, since the author seems to have done no research. SU is a site to discuss issues with things not working, not for tutorials on computers – pulsejet Aug 21 '16 at 16:36
  • @barlop I first thought of batch as batch files too, but renaming files in a batch basically means: rename multiple files, and with that reason, this can be any OS. so Dour High Arch is asking a valid question here. – LPChip Aug 21 '16 at 16:38
  • 1
    You should look into the extension .br and .brx Just removing these extensions is likely not going to give you a video that you can watch. – LPChip Aug 21 '16 at 16:39
  • +1 LPChip, do you just want to remove it (if the file is like .mp4.brx), or replace it with something like .mp4? – NetwOrchestration Aug 21 '16 at 16:40
  • @AmirHossein you write "Batch scripting differs from OS to OS" <-- it's only called batch scripting in windows or dos. (though of course renaming a batch of files is something you might do in any OS) – barlop Aug 21 '16 at 16:54
  • 2
    Please note that [SU] is not a free script/code writing service. If you tell us what you have tried so far (include the scripts/code you are already using) and where you are stuck then we can try to help with specific problems. You should also read [How do I ask a good question?](https://superuser.com/help/how-to-ask). – DavidPostill Aug 21 '16 at 17:09
  • It's been forever since I used DOS commands, but isn't this a trivial wildcard rename, something like `ren *.br* *.` (from within that directory)? If so, this sure seems like a lot of fuss over a "scripting request". – fixer1234 Aug 21 '16 at 18:12
  • @fixer1234 you are absolutely correct!! It really is as simple as that and no script needed for a solution to this problem as the OP explains... A one-liner command (well one per file extension to remove) with the syntax you provided.... If you were to add that as an answer, you'd get +1 from me. I don't think `batch-rename` tag definition necessarily means a script from my interpretation as well. – Vomit IT - Chunky Mess Style Aug 21 '16 at 18:22

2 Answers2

3

I may be missing something, but this strikes me as a simple wildcard renaming command that doesn't require a script or batch file:

ren  *.br*  *.

Do that from within the directory where the files are. It replaces any filename having an extension that begins with br with the same filename but with no extension.

BTW, if there are other files with extensions starting with .br that you don't want to change, do this in two commands with explicit extensions:

ren  *.br  *.
ren  *.brx  *.
fixer1234
  • 27,064
  • 61
  • 75
  • 116
1

If you are using any version of windows ( from windows xp till now), you can use a program called rename master. It's portable software and should be able to rename all the files at once.