5

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

3

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.

  1. Synchronize with iTunes and get a playlist with records.
  2. Go to the playlist and go File → Library → Export playlist and save txt file.
  3. Open the file in the Notepad++ and press Ctrl+A to select all text, press Tab once to get spaces in the beginning of each line.
  4. Delete first line, containing column names.
  5. Go to Edit → Columns Editor, in the opened window select the "numbers to insert" starting from 0 with increasing by 1 and the decimal system, press ok - it will include numbering of lines.
  6. 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)

  7. 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
    
  8. Replace #INSERT_HERE_YOUR_REPLACED_DATA# in your bat file with the result of 6 step

  9. If you have cyrillic symbols add this line at the beginning of your bat file

    chcp 1251 >nul
    
  10. 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.

  11. Place your bat file in the folder that you made in 10 step and run it.
1

Syncios is a safer alternative to Tongbu. Unlike iTunes, both provide a simple solution to download voice memos with their titles, providing you watch for the title characters lengths and forbidden characters.

1

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:

  1. Select all the voice memos you want to export.
  2. Open Get Info, go to the Options tab.
  3. Change the 'Media Kind' from "Voice Memo" to "Music".
  4. Export the voice memos.

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

  1. Open the item in "Get Info"
  2. Make a trivial edit to all metadata fields you want to retain. Personally, I just add a space to every "Name". For common fields which are the same for multiple voice notes (Artist, Album, Genre), you can do a batch edit.
  3. Export the voice notes. The filename will be an ugly timestamp (with hexadecimal), but if you open the file elsewhere (or in iTunes again) the metadata you edited before will still be there.
0

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.

0

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.

  1. (Same as the above first two steps on Windows) Get your Voice Memos into a playlist and export it as a text file (say, "playlist.txt").
  2. Drag and drop the files out of the playlist into a Windows Explorer window, creating files with names such as "20190327 062535.m4a".
  3. 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:

    • Set the field separator to tab, as iTunes exports tab-delimited data.
    • Skip the first line which is a header
    • Extract the 31st field (which is the full path that iTunes uses to store the file), and remove everything up to and including the last backslash to get the basename of the file, by substituting it with the empty string. Note the backslash is escaped once (\\), not twice (\\\), as it needs escaping from awk's use as an escape character, but not from bash's, as the whole awk command is wrapped in single quotes.
    • Also strip the ".m4a" suffix as we'll add it back on later.
    • print a command line which uses the mv command to move (rename) the file.
  • Finally, pipe the result to 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .