iTunes doesn't keep title of voice memo which make them quite useless. They look like DATE######.m4a
.
I'm working with these memos, any solution would fit, even jailbreak I really need to find a way.
iTunes 12.2.1.16, Windows 7, iPhone 3Gs, iOS 6
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this communityiTunes doesn't keep title of voice memo which make them quite useless. They look like DATE######.m4a
.
I'm working with these memos, any solution would fit, even jailbreak I really need to find a way.
iTunes 12.2.1.16, Windows 7, iPhone 3Gs, iOS 6
I had over 700 voice memos in my iPhone, many of which I renamed to make it easier to find the ones I need in the records.
To solve the problem of moving records to my file system keeping file names, I found this workaround for myself. I describe it step by step.
Press Ctrl+F and go to the replacement tab, then turn on the use of regular expressions Change
^(\d*)\s*([^\t]*)\t([^\t]*\t){29}[^\t\n]*\\([^\t\n\\]*).*$
to
set memoNames[$1]="$2.m4a"\nset memoLocations[$1]="$4"
(maybe the regex to replace depends on the version of iTunes because it is made according to the columns in export file)
The result should be something like this
set memoNames[0]="my custom name.m4a"
set memoLocations[0]="20130327 172842.m4a"
set memoNames[1]="some other custom name.m4a"
set memoLocations[1]="20130327 172954.m4a"
and so on (total number of lines is count of your voice memos × 2)
Next, create a batch file (for example rename_records.bat) with content with this code
@echo off
setlocal EnableDelayedExpansion
#INSERT_HERE_YOUR_REPLACED_DATA#
set "x=0"
echo starting renaming loop
timeout 2
:RenameLoop
if defined memoNames[%x%] (
set nameFrom=!memoLocations[%x%]!
set nameTo=!memoNames[%x%]!
call echo renaming #%x% %nameFrom% in %nameTo%
REM ren %%memoLocations[%x%]%% %%memoNames[%x%]%%
set /a "x+=1"
GOTO :RenameLoop
)
echo Total length of files is %x%
pause
Replace #INSERT_HERE_YOUR_REPLACED_DATA#
in your bat file with the result of 6 step
If you have cyrillic symbols add this line at the beginning of your bat file
chcp 1251 >nul
Note: Before running your bat file copy your records from iTunes library to some other folder to be sure that you won't lose your records.
It appears that this could be a long-standing bug in iTunes. I noticed that if you edit the Voice Memo's metadata via "Get Info" before exporting it out of iTunes, that ONLY edited metadata fields remain in-tact when you export and open the file elsewhere or in iTunes again. I filed a bug report with Apple, but until then we have some options.
Here's 2 workarounds:
1.) EASIEST - If you don't care about retaining the Voice Memo's timestamp:
This will rename the file as if it were a song, and the filename will be the "Name" metadata. The timestamp data will be lost, however if you convert the original non-exported item back to "Voice Memo" it will somehow restore the original filename with the timestamp.
2.) MOST accurate - To retain all metadata
I tested the step by step guidance from @Andrew Kozelski with Windows 10 but the batch file didn't rename the files. So I made some fixes and now it works:
@echo off
setlocal EnableDelayedExpansion
#INSERT_HERE_YOUR_REPLACED_DATA#
echo starting renaming loop
timeout 2
:RenameLoop
if defined memoNames[%x%] (
set nameFrom=!memoLocations[%x%]!
set nameTo=!memoNames[%x%]!
call echo !memoNames[%x%]!
call echo renaming #%x% !nameFrom! in !nameTo!
ren !nameFrom! !nameTo!
set /a "x+=1"
GOTO :RenameLoop
)
echo Total length of files is %x%
pause
If you need German mutations/Umlaute use chcp 65001
(utf-8 coding) after the @echo off
command.
Inspired by @Andrew Kozelski's approach, I created a UNIX shell script oneliner that achieves a similar result. This might be useful if like me you run iTunes and Windows inside a VM but do everything else in Linux.
Over in UNIX-land, run the following command (all one line):
iconv -f UTF-16 -t UTF-8 playlist.txt | tr -d "\r" | awk 'BEGIN {FS="\t"}; NR>1 {sub(/^.*\\/,"",$31); sub(/\.m4a$/,"",$31); print "mv " "\""$31".m4a\" " "\""$31" "$1".m4a\""}' | sh
The result will be all your files renamed with the title added: "20190327 062535 my title here.m4a".
Explanation of the command:
iconv
is used to convert from UTF-16 to UTF-8, which is a saner encoding for file names.tr
deletes the CR character, effectively converting the file from DOS line endings to UNIX line endings.awk
does several things:
mv
command to move (rename) the file.sh
to execute all the rename commands.Replace the final sh
with less
to inspect the commands before executing them.
This could probably be simplified if running within Windows (using Windows Subsystem for Linux) as you could copy directly out of iTunes's repository.
A massive thank you to Apple for making this process so slick and easy, and I am sure they won't change iTunes's playlist output format in the future because they care so much about backward compatibility and interoperability with other tools.
FOR THE SOLUTION SEE THE LAST SENTENCE :))
I got stuck on step 6 when u click on ‘regular expression’ then changing the “code” to the other “code”. I’m not sure where to edit that but. Is it in the ‘find what:’ and ‘replace with:’ column ?
Anyway when I exported my playlist to text. I noticed the title column had appeared. And it has the names of the files as u have saved them on your iPhone!
So it does exist. Just not in the conventional way.
If you’re not sure. Right click on one of the columns and select ‘Title’ and the file names will appear. Be aware that ‘Date’ & ‘Date modified’ are both the same and are the dates when u last edited it in anyway including the title.
When you copy and paste the voice files, the names that you give the files are still present they are just known as ‘title’. To see the titles on a windows PC just open the file location and where it says ‘name’ on the top left of the files listed in that folder, click the right mouse button and select ‘Title’ from the list then the ‘titles’ or names that you called the files should then appear.