Rename multiple podcast files (cpm)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 |
Newsgroups: comp.lang.awk
From: Carlos M <cpmad...@gmail.com>
Date: Mon, 8 Oct 2012 17:21:23 -0700 (PDT)
Local: Mon, Oct 8 2012 8:21 pm
Subject: Rename multiple podcast files (cpm)
In a directory with several podcast files, I am looking to rename them with a concat of the feed name and title:
$ cat 1349346290243.meta
#
#Thu Oct 04 03:25:06 PDT 2012
duration=90201
title=Some Multitasking Is More Taxing
mimetype=audio/mp3
feedName=60 second psych
url=http\://www.pheedo.com/e/fdf1f9845a3c8c5dc08cf5cbf4de0587/sa_p_podcast_120728...
size=0
to create a file named:
60_second_psych-Some_Multitasking_Is_More_Taxing.meta
Appreciate any help!
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
Newsgroups: comp.lang.awk
From: Janis Papanagnou <janis_papanag...@hotmail.com>
Date: Tue, 09 Oct 2012 12:46:33 +0200
Local: Tues, Oct 9 2012 6:46 am
Subject: Re: Rename multiple podcast files (cpm)
Am 09.10.2012 02:21, schrieb Carlos M:
> In a directory with several podcast files, I am looking to rename them with a concat of the feed name and title:
> $ cat 1349346290243.meta
> #
> #Thu Oct 04 03:25:06 PDT 2012
> duration=90201
> title=Some Multitasking Is More Taxing
> mimetype=audio/mp3
> feedName=60 second psych
> url=http\://www.pheedo.com/e/fdf1f9845a3c8c5dc08cf5cbf4de0587/sa_p_podcast_120728...
> size=0
> to create a file named:
> 60_second_psych-Some_Multitasking_Is_More_Taxing.meta
> Appreciate any help!
I'd do that with the help of a shell, something like
awk -F= '
/^title=/ {t=$2;gsub(/ /,"_",t)}
/^feedName=/ {f=$2;gsub(/ /,"_",f);
printf "mv -i \"%s\" \"%s-%s.meta\"\n", FILENAME, f, t}
' *.meta | sh
But you can also trigger awk's system() command (so that you don't see
the shell outside of the awk code).
Janis
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
Newsgroups: comp.lang.awk
From: Carlos M <cpmad...@gmail.com>
Date: Wed, 10 Oct 2012 18:53:37 -0700 (PDT)
Local: Wed, Oct 10 2012 9:53 pm
Subject: Re: Rename multiple podcast files (cpm)
You must Sign in before you can post messages.
You do not have the permission required to post.
|
|
|