DragonInCresent
DragonInCresent

Reputation: 75

CMD does not work with folders containing spaces

I would like to run the cmd from VB.NEt. the problem is that it is not working with folder containing spaces

so, the code below does not work:

Process.Start("cmd", "/C Copy /b D:\TEMP 1\*.MP3 C:\TEMP\ALL.MP3

Upvotes: 0

Views: 42

Answers (1)

DragonInCresent
DragonInCresent

Reputation: 75

I got it

the issue could be solved by enclosing folder paths with ["]. so,

Process.Start("cmd", "/C Copy /b ""D:\TEMP 1\*.MP3"" C:\TEMP\ALL.MP3")

will work fine

Upvotes: 1

Related Questions