LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-21-2005, 05:02 PM   #1
bendeco13
Member
 
Registered: Oct 2004
Distribution: Fedora 7
Posts: 232

Rep: Reputation: 30
Question k3b --audiocd "$FILES" problem


Say I have this script:

Code:
FILES='"/dir/to/1.mp3" "/dir/to/2.mp3"'
k3b --audiocd "$FILES" &
exit 1
Everytime I try this, k3b returns with a dialog that would say:
Could not find the following files:
/home/bendeco/"/dir/to/1.mp3" "/dir/to/2.mp3"

with "/home/bendeco/" being the directory in which I ran the script.

Why does it include the current directory and does anyone know of a way around this?
Its driving me insane....

It works fine from the command:
k3b --audiocd "/dir/to/1.mp3" "/dir/to/2.mp3"

Thanks in advance!!!
Bendeco
 
Old 03-22-2005, 03:19 PM   #2
bendeco13
Member
 
Registered: Oct 2004
Distribution: Fedora 7
Posts: 232

Original Poster
Rep: Reputation: 30
Well I got it working... well not exactly this code...
I ended up communicating with k3b through the dcop interface...

If anyone does indeed go through the trouble of figuring this out...
I'd still be very curious of how this works.

I think that the problem is that the quotations ("") get cancelled out when the files are being added to k3b.

Thanks Anyways
Bendeco
 
Old 03-22-2005, 03:44 PM   #3
TheLinuxDuck
Member
 
Registered: Sep 2002
Location: Tulsa, OK
Distribution: Slack, baby!
Posts: 349

Rep: Reputation: 33
I'd say that the problem has to do with the fact that the variable FILES in a ' enclosed string, which contains ". Then, the call to k3b wraps it in "", so in effect, the code is trying:
Code:
k3b --audiocd ""/dir/to/1.mp3" "/dir/to/2.mp3"" &
I'd suggest just removing the "" around the variable in the call to k3b, and I bet it will work fine.
 
Old 03-29-2005, 09:45 PM   #4
bendeco13
Member
 
Registered: Oct 2004
Distribution: Fedora 7
Posts: 232

Original Poster
Rep: Reputation: 30
I already tried removing the quotes from the call to k3b and it doesn't work, all it does is reads each part of the files as seperate files. Say I have an mp3 like: /home/joe/new song.mp3
the call:
k3b --audiocd $FILES &

causes k3b to read /home/joe/new as a file and song.mp3 as a file.

Thanks anyways....
 
Old 03-29-2005, 11:11 PM   #5
AM1SHFURN1TURE
Member
 
Registered: Sep 2004
Location: US
Distribution: Debian
Posts: 56

Rep: Reputation: 15
I'll give this a shot taking my best guess.

you see this:

""/dir/to/1.mp3" "/dir/to/2.mp3""

i think it should be like this:

""dir/to/1.mp3" "dir/to/2.mp3""

What I'm thinking is that those two forward slashes are making k3b start the path to the mp3 from the root of your hd.

This is only a wild guess, and it may be completely wrong, but it could be worth a try if you are still stuck.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
k3b: "error decoding audio tracks" and "could not unlock cd driver" lefty.crupps Linux - Software 7 10-13-2005 11:29 AM
add "Artist" and "Album Title" to mp3 files powah Linux - Software 2 04-05-2005 03:04 AM
why iam getting problems like "...too many files opened" or "segmentation fault" naren_0101bits Linux - Newbie 2 07-19-2004 12:20 PM
"X-MS" cant open because "x-Multimedia System" cant access files at "smb&qu ponchy5 Linux - Networking 0 03-29-2004 11:18 PM
k3b adding mp3 "Unable to handle the following files due to an unsupported format:" true_atlantis Linux - Software 3 01-31-2004 05:52 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration