无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 4113|回复: 7
打印 上一主题 下一主题

[求助] 请教因何有时会找不到文件的?

[复制链接]
跳转到指定楼层
1#
发表于 2016-10-27 16:48:51 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
请教因何有时会找不到文件的?

我的是Windows 7 Pro x64, 我用OneShipping.bat, 里面内容是:
if not exist "P:\Wait.html" D:\"Pro-InstallED\My = Profit\Move File = Time Stamp.exe" P:\Temp\*.html P:\
Taskkill /f /im "Move File = Time Stamp.exe"
if not exist "P:\Wait.html" D:\"Pro-InstallED\My = Profit\Goto Window Control.exe" "The Bat!" "K"
if not exist "P:\Wait.html" Taskkill /f /im "Goto Popup Click Botton.exe"
if not exist "P:\Wait.html" D:\"Pro-InstallED\My = Profit\Goto Popup Click Botton.exe" "Browse For Folder" "OK"
if not exist "P:\Wait.html" Taskkill /f /im "Goto Popup Click Botton.exe"
if not exist "P:\Wait.html" D:\"Pro-InstallED\My = Profit\Goto Popup Click Botton.exe" "Extract Attachments" "&Increment the file name"
if not exist "P:\Wait.html" Taskkill /f /im "Goto Popup Click Botton.exe"
if not exist "P:\Wait.html" D:\"Pro-InstallED\My = Profit\Goto Popup Click Botton.exe" "Extract Attachments" "&OK"
if not exist "P:\Wait.html" Taskkill /f /im "Goto Window Control.exe"
if not exist "P:\Wait.html" D:\"Pro-InstallED\My = Profit\Goto Window Control.exe" "The Bat!" "X"
if not exist "P:\Wait.html" Del /f /s /q P:\"Temp\*.xls"
if not exist "P:\Wait.html" D:\"Pro-InstallED\My = Profit\TheBat Save Message.html = OneShipping.bat.exe"
if not exist "P:\Wait.html" Start /min D:\"Pro-InstallED\My = Profit\Invoice To My-Gold.bat" ^& exit
if exist "P:\Wait.html" Start /B P:\Temp\Invoice=DONE.xls
if exist "P:\Wait.html" D:\"Pro-InstallED\My = Profit\Goto Window Control.exe" "Microsoft Excel - Invoice=DONE.xls" "L"
if not exist "P:\Wait.html" Copy P:\Temp\Message.html P:\Wait.html /Y

我每天都会手动的运行这OneShipping.bat七十至120次, 但每天都会有1-8次出现如下, 说找不到Move File = Time Stamp.exe, Goto Popup Click Botton.exe, Goto Window Control.exe这三个文件, 但这三个文件一直都在:

D:\Pro-InstallED\(Optimization)>if not exist "P:\Wait.html" D:\"Pro-InstallED\My = Profit\Move File = Time Stamp.exe" P:\Temp\*.html P:\
Move File Program. Build Time: 3/16/2016 5:52:54 PM.
ERROR: No Source File found
Usage: MoveFile <Source File/Folder> <Destination Folder>

D:\Pro-InstallED\(Optimization)>Taskkill /f /im "Move File = Time Stamp.exe"
ERROR: The process "Move File = Time Stamp.exe" not found.

D:\Pro-InstallED\(Optimization)>if not exist "P:\Wait.html" D:\"Pro-InstallED\My = Profit\Goto Window Control.exe" "The Bat!" "K"
Window Control Program. Build Time: 1/29/2016 11:18:22 PM

D:\Pro-InstallED\(Optimization)>if not exist "P:\Wait.html" Taskkill /f /im "Goto Popup Click Botton.exe"
ERROR: The process "Goto Popup Click Botton.exe" not found.

D:\Pro-InstallED\(Optimization)>if not exist "P:\Wait.html" D:\"Pro-InstallED\My = Profit\Goto Popup Click Botton.exe" "Browse For Folder" "OK"
Window Button Click Program. Build time: 1/31/2016 6:03:19 PM
ERROR: Could not find the window.
Usage: WindowButtonClick <Window Name> <Button Name>

D:\Pro-InstallED\(Optimization)>if not exist "P:\Wait.html" Taskkill /f /im "Goto Popup Click Botton.exe"
ERROR: The process "Goto Popup Click Botton.exe" not found.

D:\Pro-InstallED\(Optimization)>if not exist "P:\Wait.html" D:\"Pro-InstallED\My = Profit\Goto Popup Click Botton.exe" "Extract Attachments" "&Increment the file name"
Window Button Click Program. Build time: 1/31/2016 6:03:19 PM
ERROR: Could not find the window.
Usage: WindowButtonClick <Window Name> <Button Name>

D:\Pro-InstallED\(Optimization)>if not exist "P:\Wait.html" Taskkill /f /im "Goto Popup Click Botton.exe"
ERROR: The process "Goto Popup Click Botton.exe" not found.

D:\Pro-InstallED\(Optimization)>if not exist "P:\Wait.html" D:\"Pro-InstallED\My = Profit\Goto Popup Click Botton.exe" "Extract Attachments" "&OK"
Window Button Click Program. Build time: 1/31/2016 6:03:19 PM
ERROR: Could not find the window.
Usage: WindowButtonClick <Window Name> <Button Name>

D:\Pro-InstallED\(Optimization)>if not exist "P:\Wait.html" Taskkill /f /im "Goto Window Control.exe"
ERROR: The process "Goto Window Control.exe" not found.

D:\Pro-InstallED\(Optimization)>if not exist "P:\Wait.html" D:\"Pro-InstallED\My = Profit\Goto Window Control.exe" "The Bat!" "X"
Window Control Program. Build Time: 1/29/2016 11:18:22 PM

D:\Pro-InstallED\(Optimization)>if not exist "P:\Wait.html" Del /f /s /q P:\"Temp\*.xls"
Could Not Find P:\Temp\*.xls

D:\Pro-InstallED\(Optimization)>if not exist "P:\Wait.html" D:\"Pro-InstallED\My = Profit\TheBat Save Message.html = OneShipping.bat.exe"

谢谢帮忙
2#
发表于 2016-10-27 20:40:55 | 只看该作者
楼主的批处理实在不敢恭维啊,都看不下去。。。

还是把文件名和路径中的空格去掉吧,=去掉最好。

稍微整理下,有问题自己该。



  1. pushd D:\Pro-InstallED\My = Profit\
  2. if not exist "P:\Wait.html" (
  3.         "Move File = Time Stamp.exe" P:\Temp\*.html P:\
  4.         Taskkill /f /im "Move File = Time Stamp.exe"
  5.         "Goto Window Control.exe" "The Bat!" "K"
  6.         Taskkill /f /im "Goto Popup Click Botton.exe"
  7.         "Goto Popup Click Botton.exe" "Browse For Folder" "OK"
  8.         Taskkill /f /im "Goto Popup Click Botton.exe"
  9.         "Goto Popup Click Botton.exe" "Extract Attachments" "&Increment the file name"
  10.         Taskkill /f /im "Goto Popup Click Botton.exe"
  11.         "Goto Popup Click Botton.exe" "Extract Attachments" "&OK"
  12.         Taskkill /f /im "Goto Window Control.exe"
  13.         "Goto Window Control.exe" "The Bat!" "X"
  14.         Del /f /s /q "P:\Temp\*.xls"
  15.         "TheBat Save Message.html = OneShipping.bat.exe"
  16.         Start /min "Invoice To My-Gold.bat" ^& exit
  17. )

  18. if exist "P:\Wait.html" (
  19.         Start /B P:\Temp\Invoice=DONE.xls
  20.         "Goto Window Control.exe" "Microsoft Excel - Invoice=DONE.xls" "L"
  21. )
  22. if not exist "P:\Wait.html" Copy P:\Temp\Message.html P:\Wait.html /Y
复制代码

点评

谢谢. 不過這一运行就會popup下圖: [attachimg]252707[/attachimg]  详情 回复 发表于 2016-10-27 23:08
回复

使用道具 举报

3#
 楼主| 发表于 2016-10-27 23:08:36 | 只看该作者
nttwqz 发表于 2016-10-27 20:40
楼主的批处理实在不敢恭维啊,都看不下去。。。

还是把文件名和路径中的空格去掉吧,=去掉最好。

谢谢.
不過這一运行就會popup下圖:

点评

我已去掉所有的空格及=, 改成如下, 但情況一樣, 有时会找不到.exe pushd D:\Pro-InstallED\(Optimization)\ if not exist "P:\Wait.html" ( "Move File = Time Stamp.exe" P:\Temp\*.html P:\  详情 回复 发表于 2016-11-3 20:48
加个转义字符试试  详情 回复 发表于 2016-10-27 23:41
回复

使用道具 举报

4#
发表于 2016-10-27 23:41:29 来自手机 | 只看该作者
clautton 发表于 2016-10-27 23:08
谢谢.
不過這一运行就會popup下圖:

加个转义字符试试

点评

我已弄好了. thank you.  详情 回复 发表于 2016-10-28 18:07
不好意思, 其实我是完全不懂的.  详情 回复 发表于 2016-10-27 23:50
回复

使用道具 举报

5#
 楼主| 发表于 2016-10-27 23:50:18 | 只看该作者
本帖最后由 clautton 于 2016-10-28 00:00 编辑
nttwqz 发表于 2016-10-27 23:41
加个转义字符试试


不好意思, 其实我是完全不懂的.
转义字符是什么我也不懂.
回复

使用道具 举报

6#
 楼主| 发表于 2016-10-28 18:07:14 | 只看该作者
nttwqz 发表于 2016-10-27 23:41
加个转义字符试试

我已弄好了. thank you.
回复

使用道具 举报

7#
 楼主| 发表于 2016-11-3 20:48:49 | 只看该作者
clautton 发表于 2016-10-27 23:08
谢谢.
不過這一运行就會popup下圖:

我已去掉所有的空格及=, 改成如下, 但情況一樣, 有时会找不到.exe

pushd D:\Pro-InstallED\(Optimization)\
if not exist "P:\Wait.html" (
        "Move File = Time Stamp.exe" P:\Temp\*.html P:\
        Taskkill /f /im "MoveFileTimeStamp.exe"
        "Goto Window Control.exe" "The Bat!" "K"
        Taskkill /f /im "GotoPopupClickBotton.exe"
        "Goto Popup Click Botton.exe" "Browse For Folder" "OK"
        Taskkill /f /im "GotoPopupClickBotton.exe"
        "Goto Popup Click Botton.exe" "Extract Attachments" "&Increment the file name"
        Taskkill /f /im "GotoPopupClickBotton.exe"
        "GotoPopupClickBotton.exe" "Extract Attachments" "&OK"
        Taskkill /f /im "GotoWindowControl.exe"
        "GotoWindowControl.exe" "The Bat!" "X"
        Del /f /s /q "P:\Temp\*.xls"
        "TheBatSaveMessage.htmlOneShipping.bat.exe"
        Start /min "InvoiceToMy-Gold.bat" ^& exit
)

if exist "P:\Wait.html" (
        Start /B P:\Temp\Invoice=DONE.xls
        "GotoWindowControl.exe" "Microsoft Excel - Invoice=DONE.xls" "L"
)
if not exist "P:\Wait.html" Copy P:\Temp\Message.html P:\Wait.html /Y
回复

使用道具 举报

8#
发表于 2017-1-11 22:19:02 | 只看该作者
大多数人想要改造这个世界,但却罕有人想改造自己。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-11-16 20:48

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表