On Tue, Nov 17, 2009 at 10:00 PM, Adam Folkesson
<adam_folkesson / hotmail.com> wrote:

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

Note that directory is already a string, there's no need to build
another string to interpolate

    Dir.entries(directory)

just works.

> ---------------------------------------------------------------------
> 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?

Could it be the case that you're missing a slash between "Ssong 5"
and the filename?