1

Getting OSError:

[WinError 123] The filename, directory name, or volume label syntax is incorrect: 'Example > Folder' Error

with

os.mkdir('Example > Folder') 

How can I keep special symbols like ">" in my directory name

Mureinik
  • 297,002
  • 52
  • 306
  • 350
yeehuboi
  • 175
  • 1
  • 5
  • 1
    Possible duplicate of [What characters are forbidden in Windows and Linux directory names?](https://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names) – donkopotamus Jul 12 '19 at 20:04

2 Answers2

1

If your operating system / file system does not support those symbols in a directory name, then you cannot keep those special symbols.

Jmonsky
  • 1,519
  • 1
  • 9
  • 16
1

You can't use the > character in a file/folder name in Windows. There's nothing you can do from Python's side if the underlying OS won't allow it.

Mureinik
  • 297,002
  • 52
  • 306
  • 350