开发者

DOS:remove spaces

I am executing the below scrip开发者_高级运维t, but it is not working as there are spaces in between. Below is the script:

move C:\abc\d\System Table\Table Six (Top)\LogFiles*.jpg D:\Archive\

How can we eliminate the spaces in between & make sure the system understands so that it moved all jpg files to D:\Archive

Regards, Orbit


Place quotes around the file names. That indications to the command line parser that everything between the quotes is a single token

move "C:\abc\d\System Table\Table Six (Top)\LogFiles*.jpg" "D:\Archive\"


Wrap long filenames in double quotes.

move "C:\abc\d\System Table\Table Six (Top)\LogFiles*.jpg" "D:\Archive\"


For more DOS batch file commands and syntax, http://www.dostips.com/ has a pretty good list and lots of examples.

As an alternative, you could use the 8.3 representation and remove the spaces (though I prefer the quotes and spaces).

move C:\abc\d\System Table\Table Six (Top)\LogFiles*.jpg D:\Archive\

move C:\abc\d\System~1\Tables~1\LogFiles*.jpg D:\Archive\

If you have other similarly named directories, the ~? could be different.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜