bat系统找不到指定文件怎么办?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了bat系统找不到指定文件怎么办?相关的知识,希望对你有一定的参考价值。

我用bat时显示找不到指定文件

参考技术A 检查脚本中执行或操作用的文件是否存在于指定的路径中?如果不在肯定会报这样的错。

bat文件找不到

前面做了个清除垃圾的批处理文件,今天想用是却发现文件找不到。再试其它的批处理文件都是找不到

Windows 找不到文件.bat?在.bat文件双击后出现“windows

不能打开此文件”框.bat无法运行!

原来是关联出错误了!
1)可以用先打开cmd.exe,输入命令:

assoc .bat=batfile
assoc .exe=exefile
assoc .cmd=cmdfile

ftype batfile=cmd.exe %1 %*

然后通过命令行start test.bat cmd.exe

测试一下,又可以用了,呵呵

可是又有新问题出现了,打开所有的bat文件,在.bat文件双击后不再出现“windows

不能打开此文件”框,但是都只能打开cmd窗口到当前的bat路径下,而不能直接执行bat文件里面的命令,必须要输入 start 文件名.bat cmd.exe 才能执行

执行如下命令后,问题解决了:

ftype batfile="%1" %*
assoc .bat=batfile
ftype cmdfile="%1" %*
assoc .cmd=cmdfile

双击就可以执行bat文件了,呵呵!

2)提示:如果exe文件打不开,可以先改成com后缀,就可以打开了!改好之后再改回去
参考技术A 用记事本打开后输入:
@echo off
echo 正在清除系统垃圾文件,请稍等....
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\cookies\*.*
del /f /q %userprofile%\recent\*.*
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"
echo 清除系统垃圾完成!
echo. & pause

把文件另存为“清除系统垃圾.bat”就可以了。
参考技术B 只是部分论坛的话~就要排除cookie的原因了~毕竟如果是cookie出问题了~所有论坛都会登不进去~可能你想登陆的那个论坛正在维护~过段时间登就好了。。。

以上是关于bat系统找不到指定文件怎么办?的主要内容,如果未能解决你的问题,请参考以下文章

SDK manager.exe 运行时报错:系统找不到指定的文件 android.bat

bat运行出错,提升找不到文件,或者F=文件,D=目录?

bat文件找不到

系统找不到指定路径

把服务器上的dll文件下载到本地指定的路径(java实现)

系统找不到指定路径,如何解决?