Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialTong Vang
9,926 PointsSyntax Error with "mkdir" using Windows
C:\Users\Tom\odot>mkdir -p spec/features/todo_lists
The syntax of the command is incorrect.
Why is my cmd line saying this?
1 Answer
Nick Fuller
9,027 PointsHi Tong! (I'm assuming) You're using Windows and Ruby (Oh boy you're a brave soul!). It certainly is possible, but the few I know whom have tried end up with virtual machines!
The issue it seems is the file path structure. You're following the lessons on Treehouse (great idea) but they use Apple with OSX which is unix based. You're using Windows which is DOS based. The directory structure in DOS and OSX are different. DOS uses a backslash "\" and unix systems use a forward slash "/". It looks like you're trying to use a forward slash when you should use a backslash. Furthermore, I'm not sure if windows supports the -p flag (I don't know enough about DOS).
perhaps try mkdir spec\features\todo_lists
Tong Vang
9,926 PointsTong Vang
9,926 PointsIt seems I am not allowed to create subdirectory. How do I fix this?