Directory path



Hello, I hope someone can help me because I can't figure out what's
wrong.

Here's a part of my code:
---------------------------------------------------------------------
directory = '/Volumes/Home
Directory/Media/Film/TV-serier/Supernatural/Säsong 5'
files = Dir.entries("#{directory}")
---------------------------------------------------------------------
Works like a charm!

Here's another part of my code:
---------------------------------------------------------------------
File.rename(directory+files[2], directory+episodeList[2])
---------------------------------------------------------------------
Doesn't work!

I get the error: No such file or directory - No such file or directory -
/Volumes/Home Directory/Media/Film/TV-serier/Supernatural/S???song
5supernatural.s05e05.hdtv-lol.avi or /Volumes/Home
Directory/Media/Film/TV-serier/Supernatural/S???song 5S05 E05 - Fallen
Idol.avi (Errno::ENOENT)

What the hell is wrong? I'm using the exact same string, directory. I
know this doesn't work is because I've the letter "ä" in the path. If I
change to an "a" it's works. But I can't understand why, because it
works perfectly with an "ä" in the first part of my code.

Very grateful if someone have the solution to my problem!
--
Posted via http://www.ruby-forum.com/.

.



Relevant Pages

  • Re: Function to extract values
    ... If you don't need a full-word match, you can just use the InStr function to ... do a nested loop: outer loop iterates through each name in column A. Inner ... It becomes more complicated if you need an exact match of the full word. ... with the individual words within that string, ...
    (microsoft.public.excel.programming)
  • Re: Nominations (4) -> Re: Several ways you can delete a large avi file, and other files that mig
    ... you had a whole 4k of memory to use! ... >> Tandy group into the fray, maybe one of 'em recalls it better. ... memory to string variables, and... ... >Hell, who needs a hard drive, when you've got a cassette tape running at ...
    (alt.computer.security)
  • Re: Search for first instance of text & return the value
    ... "Biff" wrote: ... in column O for ones that contain (but not limited to EXACT) ... the text string from A2. ... need a formula that will search col O for the first instance of the ...
    (microsoft.public.excel.worksheet.functions)
  • Re: indirect tire pressure gauge?
    ... note, we can zero beat the tone, sweeping through the zero beat to the ... difference to get the exact zero beat. ... so I don't have much experience with string tuning. ... All western instruments use the tempered scale. ...
    (rec.bicycles.tech)
  • Exact constant representation in compiler Const node needed?
    ... I think for some purposes it might be handy to have and exact value representation ... own parser based on tokenizer output in order to use the numeric literal differently, ... Perhaps the Const instance could have the string value as well, ...
    (comp.lang.python)