I using MS-DOS 7.10. My bash script is to copy all files in current and subfolder to another folder (I dont want to use xcopy). I used

For /f %%Y In (DirPath) Do

MS-DOS says "Invalid Syntax". What wrong with this command? Is it unsupported by command.com?

有帮助吗?

解决方案

You need to show us a little more of your batch.

In all probability, you are following the DO with a block.

A statement-sequence, counting as a single statement may be (parenthesised over many lines if you like) but if used on an IF statement, the IF and ( must be on the same physical line (similarly, in a FOR..DO, if a block is used, the DO and ( must be on the same physical line).

If however you are using real, genuine MSDOS rather than CMD (the windows emulator) then for /f is not supported under MSDOS

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top