"no such file or directory error when folder name has spaces

Hello.

I’m new to beets and just discovering its wealth of features.

I’m running Windows 10 and I encounter an annoying problem. When I fire up the command line to tag an album, I get “a no such file or directory” error when the folder I’m trying to import has a space in its name.

Here’s an example:
# beet import T:\Musique\Rock_Pop_Folk\Talk Talk\2012 - The Party’s Over
error: no such file or directory: T:\Musique\Rock_Pop_Folk\Talk

If I remove the space in the directory’s name (making it “TalkTalk”), beets imports the folder. What I don’t understand is that the subfolder has spaces in its name, but those don’t cause problems for beets.

Any idea how I could solve it? Thanks for any assistance :slight_smile:

Hi! You will need to use your shell’s escaping features to pass the filename as a single argument. For example, you might try putting single quotes around the filename or putting a \ before the space. But in general, you’ll want to read up on how command-line arguments in the Windows console get parsed. :slight_smile:

Hi

Thanks for the reply. I tried using quotation marks, and it did solve the space issue. However, the name of this particular directory posed another problem: single quotes! Escaping them seems very tricky.

However, I’ve found a workaround, and that’s using the short paths of folders. The file manager that I use (Freecommander) lets you copy this short path by just clicking a button and with short paths, beets has no problem.

For people who do not use a file manager, an alternative is to use a shell extension such as Pathcopy that lets you copy short paths to the clipboard by right-clicking on the folder and selecting the proper option (“Short path”).

Thanks for the assistance :slight_smile: