Change file names to numbers on SD card.
February 14, 2025 4:09 AM   Subscribe

Hi everyone; I have many Old Time Radio shows on a micro SD card in my cell. I want to change the name of the file to a number. Because I have many,I want a way to do this all at once,instead of me having to rename every file name to a number. Is there a simple program that will do this? I am using a Chromebook. Thank you :)
posted by LOOKING to Computers & Internet (12 answers total)
 
I'm not sure I understand fully what you're trying to do, but have a look at Regex Renamer. It's easy to use and quite powerful.

You may have to look up how to define a regular expression (that's what regex stands for, by the way) that does what you want, but that's normal.

Alternatively, if you can describe in more detail his you want the renaming to work (with a few example filenames), I'll take a shot at figuring out the right settings myself.
posted by demi-octopus at 7:58 AM on February 14


Response by poster: Hi demi-octopus ;
I looked at regex,and thats a windows program,does not work for a Chromebook.
They are all mp3 files,but I want to put a number at the start of the file,1,2,3,4 and so forth. This way I know what file to pick to listen to(there are many in 1 folder).
I'm hoping to find a program to add numbers automatically,instead of me having to rename every file one at a time.
There are a lot of programs to rename files for windows ,lol,but I can't seem to find one for Chromebook.
Thanks for the reply though :)
posted by LOOKING at 8:10 AM on February 14


I don't know if this is the final word, but this page says that there are no bulk renaming options on a chromebook:
https://laptopsidea.com/how-to-rename-files-on-chromebook/

The good news is that you can easily plug that sd card into any windows or mac with the right port or adapter. Even your local library might have options. For Windows, I use Bulk Rename Utility and they have a portable version. There also seem to be some options for bulk renaming in Google Drive. You could move the files into your drive, rename them and then copy them back.
posted by soelo at 8:17 AM on February 14


Response by poster: Hi soelo ;
Well that's not the news I wanted to hear,lol.
I guess I will have to rename them 1 file at a time,I was really trying to avoid doing it that way.
Thanks for the info :)
posted by LOOKING at 8:29 AM on February 14


a micro SD card in my cell

What kind of phone do you have?
posted by trig at 8:36 AM on February 14


but this page says that there are no bulk renaming options on a chromebook

It's very hard to prove a negative and that site looks very AI-generated. I wouldn't trust it.

If you can open a terminal on your Chromebook, you might have access to rename
posted by RonButNotStupid at 8:43 AM on February 14 [1 favorite]


To clarify my question above, I don't think it's impossible to do this, either from your chromebook or probably from your phone (especially if you're running android). That said, unless you can find an app that will do this (look around in the chromebook/android/ios app stores), doing it may be more technical than you're comfortable with, or just more trouble than it's worth.

(This would be a pretty simple thing on any other kind of computer. Any chance you know someone who'd let you use theirs?)

I don't have a chromebook so I can't give specific instructions or try out anything, and without knowing what kind of phone you have it's hard to help with that either.

If you find apps that will do batch file renaming, make sure they're from some reputable developer. Utility-type apps, especially the free ones, seem to be a popular vector for malware.

If you don't find a reputable app for renaming files on your phone or chromebook, the way to do this would be via a commandline terminal of some sort - either directly on chromeOS, or running some kind of emulator like termux (for android phones) or a virtual machine on your chromebook, or rebooting your chromebook temporarily into linux using a live USB.

At the point where you've got a commandline available that can run a mv command and a for loop, or the rename command, or something similar, the actual renaming part is easy.

Note that in some of the cases above you might have to wind up making copies of all your files with the names you want, instead of just renaming them, unless your phone/chromebook is rooted.
posted by trig at 9:05 AM on February 14


You need a command-line shell on the ChromeBook to run mmv, but it's not clear what supplies the sequence number. If your Chromebook was full Linux, kid3 is the tool for adding a track number from the id3 tag to the filename.
posted by k3ninho at 10:50 AM on February 14


ChromeOS is Linux under the hood, which means you can get access to a terminal by following the instructions here. The problems that you will then be confronted with are (1) navigating the command line to where your microSD card is within the filesystem and (2) figuring out what command(s) will rename files en masse. So:

(1) The terminal will greet you with a prompt into which you can type commands. Each terminal window you open (should you do more than one) will have its own notion of where it is, called the "working directory" -- you can type pwd (for 'print working directory') in and it will tell you where it is right now, probably something like /home/yourusername. OK, where is the microSD card? Probably somewhere in /mnt (where temporary external things like microSD cards or thumb drives get mounted, hence mnt) so let's go there. Type this command:

cd /mnt

This means "change directory to /mnt" -- which if you then type in pwd again should print out /mnt. Now we can get a list of files in the working directory by doing using the list command:

ls

Hopefully one of the items listed will look like your micro SD card, but it may be a few more directory levels down (googling suggests /mnt/chromeos/removable/sdcard). So if ls shows 'chromeos' we can try the aforementioned path:

cd /mnt/chromeos/removable/sdcard

Or one at a time using relative paths (cd without a forward slash in front of its argument means to assume that directory is relative to the current working directory; with the forward slash means relative to the root of the file system, aka, the complete path):

cd chromeos
ls
cd removable
ls
cd sdcard

Now if you do ls again you should see all the files stored in the card (and/or some folders, if you have those). Great now we can move onto the second problem.

(2) You need to run a command to rename all the files listed on your microSD card. Assuming your pwd command now prints /mnt/chromeos/removable/sdcard, and assuming your files are all .mp3 (though swap in say .wav if that's what you need), what we want to do is rename them according to just a sequence, if I understand your question. First let's see if we have access to the command rename:

rename

If it prints something like the following then you've got access to the rename command:
Usage:
    rename [ -h|-m|-V ] [ -v ] [ -0 ] [ -n ] [ -f ] [ -d ] [ -u [enc]]
    [ -e|-E perlexpr]*|perlexpr [ files ]
If you don't get that 'Usage' bit when you type rename (instead it'll say something like 'command not found') then you need to install it. To do so run this command:

sudo apt install rename

You'll need to enter your password since installing packages requires authorization. OK, now rename should print the usage as above.

We can now do this command, which will not actually change anything yet:

rename -n 'our $i; $_ = sprintf "Radio%02d.mp3", ++$i' *.mp3

What this will do is print a list of the renamed files, like this:

rename(myfile.mp3, Radio01.mp3)
rename(myotherfile.mp3, Radio02.mp3)

If you are happy with the results, remove the -n option to run the rename for real:

rename 'our $i; $_ = sprintf "Radio%02d.mp3", ++$i' *.mp3

If you have more than 99 files, you'll need more digits in the number part, just change %02d according to your needs. For example, four digits would be this:

rename 'our $i; $_ = sprintf "Radio%04d.mp3", ++$i' *.mp3

Similarly you can remove/change the 'Radio' part if you don't want the filenames prefixed by that (or want some other prefix).

Hopefully this is all clear enough to follow, the command line can be a little intimidating for novices but it's very useful.
posted by axiom at 11:43 AM on February 14 [4 favorites]


I too had a large radio collection (sadly lost), and I used Mp3Tag, which is a Windows/MacOS app which allows you to edit, in bulk, the mp3 metadata aka tags. This particular app lets you also rename the files based on tags, so it would be perfect for you but for the OS issue.

There is a ChromeOS app called MP3 ID3 Tag Editor (link goes to Chrome web store) which will let you edit the tags. I haven't used it, but it appears to be what I'd use for the tagging. However, it doesn't seem to do filenames.

Once you add the tagged files to a playlist, though, every playlist setup in any player worth its salt will allow you to sort by track number. Most taggers understand that if you want to denote disk-and-track there are ways to do that as well.

What I'm saying is that you may not be able to change the filenames here, but once the files are loaded into a player's playlist, you'll have the sortable elements you're looking for, so this is a pretty good more-than-half solution in my opinion.
posted by Sunburnt at 12:08 PM on February 14


I know you said Chromebook but for anyone on Mac, Transnomino is very user friendly and free.
posted by asharchist at 2:09 PM on February 14


Response by poster: Thanks everyone for the tips.
I will do it manually,lol.

Wow axiom ,that's way to techie for me,lol-thanks anyhow.
posted by LOOKING at 8:20 AM on February 15


« Older How to privately rename text threads in Google...   |   Can I continue a PC build without a CPU cooler for... Newer »

You are not logged in, either login or create an account to post comments