From: Jolly Roger Newsgroups: comp.sys.mac.system,comp.sys.mac.apps Subject: Re: "extra" files seen in VW infotainment system Date: 24 Mar 2015 14:34:12 GMT Organization: People for the Ethical Treatment of Pirates Lines: 150 Message-ID: References: X-Trace: individual.net vyuPgVrKHT9+R8fzYH+ZVQWWv0d9Fb0hvofEzigAXPTmP4/G0D Cancel-Lock: sha1:oXRulwyk3L+bOg/ZY1suG01O9D4= X-Face: _.g>n!a$f3/H3jA]>9pN55*5<`}Tud57>1Y%b|b-Y~()~\t,LZ3e up1/bO{=-) User-Agent: slrn/1.0.1 (Darwin) Path: csiph.com!usenet.pasdenom.info!bete-des-vosges.org!feed.ac-versailles.fr!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Xref: csiph.com comp.sys.mac.system:71998 comp.sys.mac.apps:28348 On 2015-03-24, David Fritzinger wrote: > I'm not sure if this is the right newsgroup, but I'll try this anyway. > I recently bought a 2015 VW GTI. Part of the infotainment system is the > ability to store music on SD cards, to be played through the car's > infotainment system. I made copies the songs in my iTunes Music folder, > organized by album, but have been having trouble playing the songs in > the car. What I've recently noticed is that when the card is read in > the car, there appear to be two or more copies of the songs in the > album folder. One of them gives the song's name, but with an underline > preceding the song's name, and with a music symbol with a line through > it before the song's name. The second copy just has the name of the > song. I am unable to play the former (though I sometimes can, with a > bit of fooling aroung-starting and stopping the playback a few times), > but the latter plays with no problem. These extra files don't show up > in the finder on my Mac (Mid 2010 iMac, 27", 3.6 GHz i5, OSX.10.2, > iTunes 12.1.0.50). Are these files needed for the VW to play back the > songs? If not, is there an easy to get rid of them? > > Note: When selecting "Show hidden files" in Onyx, the unplayable files > do not show up in the finder. > > Thank you in advance. When you copy files containing resource forks or extended attributes to a file system that does not support them, Mac OS X creates two files: one file with the original file name to hold the actual data, and a second file named "._filename" to store the information that would have been in the resource fork or extended attributes. Typically the "._" files can be ignored, since the actual data you want is in the other files. Collectively, these two files are called AppleDouble files. You can read more about them here: On Unix systems (including Mac OS X), files with names beginning with a period (.) character are hidden from normal view. As a result, you cannot see these files in OS X Finder windows, and you do not normally see them in terminal windows with the "ls" command unless you use the -a flag on the command, like so: ls -al It's probably not a good idea to remove resource forks or extended attributes from the files on the Mac, since they are used by OS X and applications. Instead, there are two things you can do: 1. Prevent AppleDouble files from being created 2. Remove them after they are created. Preventing AppleDouble Files From Being Created I don't know of an easy way to prevent OS X Finder from creating AppleDouble files during file copies to file systems that do not support resource forks and extended attributes. So what you can do instead is use a different method to copy the files that does support suppression of AppleDouble files. One such utility is the "cp" command-line utility. In OS X, the "cp" command-line utility supports a -X switch to suppress copying resource forks and extended attributes. From the "cp" manual: CP(1) BSD General Commands Manual CP(1) NAME cp -- copy files SYNOPSIS cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory DESCRIPTION In the first synopsis form, the cp utility copies the contents of the source_file to the target_file. In the second synopsis form, the contents of each named source_file is copied to the destination target_directory. The names of the files themselves are not changed. If cp detects an attempt to copy a file to itself, the copy will fail. The following options are available: [snip] -X Do not copy Extended Attributes (EAs) or resource forks. For example, assuming your SD card was mounted at /Volumes/SD, and your music files are in the iTunes library, your "cp" command to copy the files to the SD card might look something like this (on one line): cp -rX ~/Music/iTunes/iTunes\ Media/Music/Beck/Odelay /Volumes/SD/Whatever/Odelay You could relatively easily incorporate this command into a script (shell, Perl, PHP, Ruby, or AppleScript or instance) to allow you to use it for any music you want. Using it in an AppleScript would even allow you to make to drag and drop friendly - drag the music you want to copy, drop it onto the script, and let the script copy it for you - which would be almost as user friendly as Finder copies normally are. Removing AppleDouble Files After They Are Created If using special copy commands isn't for you, what you could do instead is simply remove the AppleDouble files from the SD card right after you do the copy. Here's how I normally do that: My ~/.bashrc shell startup file has this in it to load aliases: # pick up aliases test -s ~/.alias && . ~/.alias I have a file at ~/.alias that contains a bunch of aliases I have defined, including one to remove AppleDouble files (on one line): alias remove_appledoubles='find . -name ".AppleDouble" -print -exec rm -rf "{}" \;' To use it I open a terminal window, and use the "cd" command to change the working directory to the directory containing the AppleDouble files. Then I issue the "remove_appledoubles" command alias. Assuming you had this alias defined in your shell startup files, if your SD card was mounted at /Volumes/SD, your commands might look like this: cd /Volumes/SD remove_appledoubles Or without the alias, you could just do it manually like this: cd /Volumes/SD find . -name ".AppleDouble" -print -exec rm -rf "{}" \; Remember: You would issue these commands *after* you copy the files to the SD card, to remove any AppleDouble files that were created by OS X during the copy. -- E-mail sent to this address may be devoured by my ravenous SPAM filter. I often ignore posts from Google. Use a real news client instead. JR