使用批次檔檢查檔案是否存在檔案。
Summary: 本文說明執行批次處理檔案以檢查檔案是否存在檔案的步驟。
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Symptoms
使用批次檔常式檢查檔是否存在。
您可以從命令執行批次檔,檢查檔案是否存在,然後在到達時執行常式。
注意:必須先安裝 sleep 程式,然後再執行批次檔,並隨附 Windows NT 資源套件。
Cause
。
Resolution
以下是範例,請執行下列步驟以建立例行批次處理檔案。
- 按一下開始,然後按一下執行。
- 在 Open (開啟 )欄位中輸入 CMD。
命令提示視窗隨即出現。 - 輸入 edit test. bat ,然後按下 < enter >。
備註:Word 測試 可替換為另一個詞。 - 輸入 : check_for_file_existence 然後按下 < enter >。
- 如果存在 c:\ftp\ftpfile.txt goto 執行的類型,然後按 < enter >。
備註:檔 ftpfile 可能會取代其他檔案。 - 輸入 睡眠 200 ,然後按 < enter >。
備註:可從 200 increaed 或減少秒數。 - 輸入 goto check_for_file_existence 然後按 < enter >。
- 輸入 :p erform ,然後按 < enter >。
注意:此常式檢查 ftpfile 每200秒的 .txt。當您需要在透過 FTP 將檔案傳送到電腦後執行程式時,這種類型的常式會非常有用。
Affected Products
SoftwareArticle Properties
Article Number: 000151505
Article Type: Solution
Last Modified: 20 Apr 2021
Version: 4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.