File rename command in a chain.

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.1.x version.

The final version of Audacity for Windows 98/ME is the legacy 2.0.0 version.
ppay
Posts: 21
Joined: Fri Mar 05, 2010 2:14 pm
Operating System: Please select

File rename command in a chain.

Post by ppay » Tue Mar 09, 2010 10:58 am

I made a Chain that produces an Ogg file with extension .ogg. I would like .oga extension instead of .ogg, so I am looking for a step called "File Rename" in the list of commands that would rename *.ogg to *.oga. But I cannot find such a command. What is the way to automate file renames in a chain?

kozikowski
Forum Staff
Posts: 68902
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: File rename command in a chain.

Post by kozikowski » Tue Mar 09, 2010 3:23 pm

Chain components are programmed one at a time. If you can't find a command, then it hasn't been written yet. You used to be able to do something like that in Windows Command Line. Consult your Windows manual.

Koz

ppay
Posts: 21
Joined: Fri Mar 05, 2010 2:14 pm
Operating System: Please select

Re: File rename command in a chain.

Post by ppay » Tue Mar 09, 2010 7:50 pm

Do you mean that I can take a Windows command line, any Windows command line, and add it as a step to a chain? Do you have an example of that where it is explained?

Otherwise, is there a tutorial about programming new commands for Audacity. I am not a programmer, but something as simple as file renaming should be quite easy to figure out.

steve
Site Admin
Posts: 80689
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: File rename command in a chain.

Post by steve » Tue Mar 09, 2010 8:10 pm

ppay wrote:so I am looking for a step called "File Rename" in the list of commands that would rename *.ogg to *.oga.
Audacity does not (currently) have that.

If you need to rename a lot of files, you could use a "bulk rename utility" such as this one: http://www.bulkrenameutility.co.uk/Main_Intro.php
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

ppay
Posts: 21
Joined: Fri Mar 05, 2010 2:14 pm
Operating System: Please select

Re: File rename command in a chain.

Post by ppay » Tue Mar 09, 2010 8:19 pm

Thanks for your contribution. I know about bulk rename utilities, but it is much more powerful if it is possible to rename files inside a chain in Audacity. My needs are very simple: .oga for ogg audio instead of the default .ogg given by Audacity. Even better would be to parameter the output extension for Ogg files to .oga. The only output setting is currently the quality level of the output.

Anyway, if Audacity makes it possible for common users like me to easily program their own commands, please point me to the right tutorial for that. Otherwise, I will have to wait that someone (who?) writes a file-rename command.

steve
Site Admin
Posts: 80689
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: File rename command in a chain.

Post by steve » Tue Mar 09, 2010 10:51 pm

From the Windows Command prompt you can use:

Code: Select all

ren *.ogg *.oga
If you are unfamiliar with the Windows command prompt, here's what you do in Win XP:
1) START button > Run...
2) Type "cmd" (without the quotes) and click OK (opens a command window). This will open in your user space C:Documents and Settigs<user name>
3) Use the "CD" (change directory) command to navigate to the appropriate folder, for example to go into "My DocumentsMy Music" you would type:

Code: Select all

cd "My DocumentsMy Music"
4) When you are in the folder where the ogg files are located, use the "ren" (rename) command as described above.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

ppay
Posts: 21
Joined: Fri Mar 05, 2010 2:14 pm
Operating System: Please select

Re: File rename command in a chain.

Post by ppay » Tue Mar 09, 2010 11:09 pm

What does this have to do with Audacity?

steve
Site Admin
Posts: 80689
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: File rename command in a chain.

Post by steve » Wed Mar 10, 2010 5:51 pm

You wrote:
ppay wrote:Otherwise, I will have to wait that someone (who?) writes a file-rename command.
I wrote:
stevethefiddle wrote:From the Windows Command prompt you can use:
ren *.ogg *.oga
That's a file rename command. It doesn't run in Audacity, but it is a file rename command and will perform the file renaming that you require.

Also not to do with Audacity, why do you need to rename your .ogg files as .oga? (just wondering)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

kozikowski
Forum Staff
Posts: 68902
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: File rename command in a chain.

Post by kozikowski » Wed Mar 10, 2010 6:08 pm

If you're a programmer, you could write an Audacity tool yourself. That would be your contribution to the open source community.

So the choices are: write it yourself, wait for somebody else to write it, do the job outside of Audacity the simplest way being Windows Command Line as written above.

Koz

ppay
Posts: 21
Joined: Fri Mar 05, 2010 2:14 pm
Operating System: Please select

Re: File rename command in a chain.

Post by ppay » Wed Mar 10, 2010 6:55 pm

stevethefiddle wrote:Also not to do with Audacity, why do you need to rename your .ogg files as .oga? (just wondering)
That's because I want to embed videos and audio files in html5 <audio> and <video> tags in Opera. To make it clear which tag should be used, I prefer to have .oga for audio and .ogv for video, otherwise .ogg could be either audio or video and it is difficult to decide which tag should be used.

kozikowski wrote:If you're a programmer, you could write an Audacity tool yourself.
Are there any tutorials about how to write Audacity tools?

Locked