문제

Due to sometimes empty variables within a cmd-script I get directory definitions with doubled backslashes (\\). Example:

SET "Mp3OutDir=%Mp3Root%\%AlbumDir%\%AlbumArtist1stChar%\%AlbumArtistSort_VDN%\[%Year%] %Album_VDN%"

leads, if %AlbumDir% is not defined by user within the procedure, to something like

mkdir "D:\Public\Music\Mp3CDRips\\G\Gabriel, Peter"

This seems to work without errors but I'm curious if a term like this is permitted by the cmd-interpreter.

Cheers, Martin

도움이 되었습니까?

해결책

The cmd interpreter seems to ignore extra back slashes in directory names. For example:

C:\>cd Windows\\\\\\\\\\\System32

This will still change the directory to C:\Windows\System32>.

So to answer your question, yes, a term like that is permitted by the cmd interpreter. As to why, I'm not sure.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top