小编use*_*447的帖子

批处理文件给出“系统找不到指定的文件”,但命令在 cmd 中运行良好

我正在尝试运行一个简单的批处理文件:

@echo off      <-- don't print this line or any of the preceeding lines to the console window.
pushd "K:\"    <-- in the quoted directory
for %%j in (*) <-- for every file in the directory
do
if %%~zj       <-- if the size of the file
lss 37000      <-- is less than 37k
del %%j        <-- delete the file
popd           <-- go back to original directory.
Run Code Online (Sandbox Code Playgroud)

我开始在@echo offand处出错pushd,但如果我尝试pushdcmd.exe它运行得很好。我确定我错过了一些简单的东西。

有任何想法吗?

windows batch command-line windows-8

6
推荐指数
1
解决办法
5万
查看次数

标签 统计

batch ×1

command-line ×1

windows ×1

windows-8 ×1