<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=4650&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [SOLVED] Delete track number from music file names]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=4650</link>
		<description><![CDATA[The most recent posts in [SOLVED] Delete track number from music file names.]]></description>
		<lastBuildDate>Thu, 25 Nov 2021 14:48:45 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [SOLVED] Delete track number from music file names]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=32992#p32992</link>
			<description><![CDATA[<p>Just an fyi on renaming large numbers of files.&#160; sed works really well.</p>]]></description>
			<author><![CDATA[dummy@example.com (garyk)]]></author>
			<pubDate>Thu, 25 Nov 2021 14:48:45 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=32992#p32992</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Delete track number from music file names]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=32719#p32719</link>
			<description><![CDATA[<div class="quotebox"><cite>ralph.ronnquist wrote:</cite><blockquote><div><p>The -exec option variant for find that ends with <span class="bbc">&#039;;&#039;</span> rather than <span class="bbc">+</span> lets you use <span class="bbc">{}</span> more freely, and then perhaps the following would work</p><div class="codebox"><pre><code>find . -type f -name &#039;[0-9][0-9] - *&#039; \
    -exec sh -c &quot;file-rename -v &#039;s/^[0-9][0-9]\s-\s//&#039; &#039;{}&#039;&quot; &#039;;&#039;</code></pre></div></div></blockquote></div><p>That proposal causes 3 times a: &quot;1: Syntax error: Unterminated quoted string&quot;. Tried to fix this, but failed. No idea what exactly caused that to fail. Fiddeled with the quotes around the {}, the ; and the file-rename string.</p><div class="quotebox"><cite>ralph.ronnquist wrote:</cite><blockquote><div><p>or almost certainly (and with less python):</p><div class="codebox"><pre><code>find . -type f -name &#039;[0-9][0-9] - *&#039; \
    -exec sh -c &#039;X=&quot;{}&quot;; mv &quot;{}&quot; &quot;${X#*- }&quot;&#039; &#039;;&#039;</code></pre></div></div></blockquote></div><p>and this one does the job! Thank you, never would have got that together. This line also works on both ways a &#039; is quoted in the file names on the terminal line:</p><div class="codebox"><pre><code>&quot;Chris Rea - Let&#039;s Dance.wav&quot;
&#039;Dr. Hook &amp; The Medicine Show - Sylvia&#039;\&#039;&#039;s Mother.wav&#039;</code></pre></div><p>Again, many thanks for this solution.</p><p>rolfie</p>]]></description>
			<author><![CDATA[dummy@example.com (rolfie)]]></author>
			<pubDate>Tue, 09 Nov 2021 18:44:43 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=32719#p32719</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Delete track number from music file names]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=32680#p32680</link>
			<description><![CDATA[<p>I would use</p><div class="codebox"><pre><code>for file in * ; do mv &quot;$file&quot; &quot;${file#*- }&quot; ; done</code></pre></div><p>EDIT: see section 2.6.2 of the <a href="https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18" rel="nofollow">POSIX sh command language guide</a> for an explanation.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Mon, 08 Nov 2021 14:47:23 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=32680#p32680</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Delete track number from music file names]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=32674#p32674</link>
			<description><![CDATA[<p>disregard.</p>]]></description>
			<author><![CDATA[dummy@example.com (hevidevi)]]></author>
			<pubDate>Mon, 08 Nov 2021 10:23:29 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=32674#p32674</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Delete track number from music file names]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=32670#p32670</link>
			<description><![CDATA[<p>The -exec option variant for find that ends with <span class="bbc">&#039;;&#039;</span> rather than <span class="bbc">+</span> lets you use <span class="bbc">{}</span> more freely, and then perhaps the following would work</p><div class="codebox"><pre><code>find . -type f -name &#039;[0-9][0-9] - *&#039; \
    -exec sh -c &quot;file-rename -v &#039;s/^[0-9][0-9]\s-\s//&#039; &#039;{}&#039;&quot; &#039;;&#039;</code></pre></div><p>or almost certainly (and with less python):</p><div class="codebox"><pre><code>find . -type f -name &#039;[0-9][0-9] - *&#039; \
    -exec sh -c &#039;X=&quot;{}&quot;; mv &quot;{}&quot; &quot;${X#*- }&quot;&#039; &#039;;&#039;</code></pre></div><p>EDIT: added the missing <span class="bbc">*</span></p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Mon, 08 Nov 2021 03:16:57 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=32670#p32670</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Delete track number from music file names]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=32668#p32668</link>
			<description><![CDATA[<p>I&#039;m interested in your command line approach. I use easytag to change mine, but it&#039;s one at a time and can be quite arduous. Following...</p>]]></description>
			<author><![CDATA[dummy@example.com (GlennW)]]></author>
			<pubDate>Mon, 08 Nov 2021 01:53:43 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=32668#p32668</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Delete track number from music file names]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=32664#p32664</link>
			<description><![CDATA[<div class="quotebox"><cite>hemimaniac wrote:</cite><blockquote><div><p>would this work for ya?</p><p><a href="http://www.guyrutenberg.com/2009/01/12/batch-renaming-using-sed/" rel="nofollow">http://www.guyrutenberg.com/2009/01/12/ … using-sed/</a></p><p>Or if you would like a GUI , I use gprename all the time, with gprename you may need to also install ssed as for some reason it doesn&#039;t get pulled automatically</p></div></blockquote></div><p>Well, different approach. I first want to try if I can get my approach to work. Thank you anyway.</p><p>rolfie</p>]]></description>
			<author><![CDATA[dummy@example.com (rolfie)]]></author>
			<pubDate>Sun, 07 Nov 2021 21:32:10 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=32664#p32664</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Delete track number from music file names]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=32663#p32663</link>
			<description><![CDATA[<p>One step further, replaced rename with file-rename from the Debian package <span class="bbc">rename</span>. It now reads </p><div class="codebox"><pre><code>find . -type f -name &#039;[0-9][0-9] - *&#039; -exec file-rename -v &#039;s/^[0-9][0-9]\s-\s//&#039; {} +</code></pre></div><p>A direct </p><div class="codebox"><pre><code>file-rename -v &#039;s/^[0-9][0-9]\s-\s//&#039; &#039;01 - Canned Heat - On The Road Again.wav&#039;</code></pre></div><p> renames the file as desired. So I have a problem with the hand-over of the filenames from find to file-rename. And here I am stuck. I have too little insight into this topic.</p><p>rolfie</p>]]></description>
			<author><![CDATA[dummy@example.com (rolfie)]]></author>
			<pubDate>Sun, 07 Nov 2021 21:25:41 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=32663#p32663</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Delete track number from music file names]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=32661#p32661</link>
			<description><![CDATA[<p>would this work for ya?</p><p><a href="http://www.guyrutenberg.com/2009/01/12/batch-renaming-using-sed/" rel="nofollow">http://www.guyrutenberg.com/2009/01/12/ … using-sed/</a></p><p>Or if you would like a GUI , I use gprename all the time, with gprename you may need to also install ssed as for some reason it doesn&#039;t get pulled automatically</p>]]></description>
			<author><![CDATA[dummy@example.com (hemimaniac)]]></author>
			<pubDate>Sun, 07 Nov 2021 20:58:03 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=32661#p32661</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] Delete track number from music file names]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=32660#p32660</link>
			<description><![CDATA[<p>Got a lot of music data on my file server. Before finding out that an easy duplicate recognition isn&#039;t possible, files were ripped beginning with the track number from the CD. I stopped this later on and want to clean up now. Example:</p><div class="codebox"><pre><code>01 - Canned Heat - On The Road Again.wav</code></pre></div><p>My goal is to remove the track number from the file name for all files having this in the current directory. Example:</p><div class="codebox"><pre><code>Canned Heat - On The Road Again.wav</code></pre></div><p>From digging through man pages and several threads on many forums, I finally came up with this approach:</p><div class="codebox"><pre><code>find . -type f -name &#039;[0-9][0-9] - *&#039; -exec rename &#039;s/^[0-9][0-9] - //&#039; {} +</code></pre></div><p>The find part works, with the -print option it lists all the files in the test directory I have set up. The rename part has a problem, and I can&#039;t figure out what&#039;s wrong. I have learned that compared to Debian the rename utility isn&#039;t part of the util-linux package but a perl application that has to be installed separately. How is the relation between regex and a perl-expression?</p><p>In any case, above line in a script does not seem to do anything, the script terminates without action, output or error. What ido I need to change? </p><p>rolfie</p>]]></description>
			<author><![CDATA[dummy@example.com (rolfie)]]></author>
			<pubDate>Sun, 07 Nov 2021 20:47:21 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=32660#p32660</guid>
		</item>
	</channel>
</rss>
