Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Create and access a list of your products

使用批次檔檢查檔案是否存在檔案。

Summary: 本文說明執行批次處理檔案以檢查檔案是否存在檔案的步驟。

This article applies to   This article does not apply to 

Symptoms

使用批次檔常式檢查檔是否存在。

您可以從命令執行批次檔,檢查檔案是否存在,然後在到達時執行常式。

注意:必須先安裝 sleep 程式,然後再執行批次檔,並隨附 Windows NT 資源套件
 

Cause

Resolution

以下是範例,請執行下列步驟以建立例行批次處理檔案。

  1. 按一下開始,然後按一下執行
  2. Open (開啟 )欄位中輸入 CMD
    命令提示視窗隨即出現。
  3. 輸入 edit test. bat ,然後按下 < enter >。

    備註:Word 測試 可替換為另一個詞。
  4. 輸入 : check_for_file_existence 然後按下 < enter >。
  5. 如果存在 c:\ftp\ftpfile.txt goto 執行的類型,然後按 < enter >。

    備註:檔 ftpfile 可能會取代其他檔案。
  6. 輸入 睡眠 200 ,然後按 < enter >。

    備註:可從 200 increaed 或減少秒數。
  7. 輸入 goto check_for_file_existence 然後按 < enter >。
  8. 輸入 :p erform ,然後按 < enter >。

注意:此常式檢查 ftpfile 每200秒的 .txt。當您需要在透過 FTP 將檔案傳送到電腦後執行程式時,這種類型的常式會非常有用。

 


 

Affected Products

Software