這是專案
@echo off
set /p s=Enter the name of the account you want to search for:
start https://www.facebook.com/%s%
start https://www.instagram.com/%s%
start https://www.tiktok.com/@%s%
start https://twitter.com/%s%
start https://story.snapchat.com/@%s%
echo %s% >> History.txt
我想在文本檔案的頂部放置一個標題
如果你這樣寫代碼
@echo off
set /p s=Enter the name of the account you want to search for:
start https://www.facebook.com/%s%
start https://www.instagram.com/%s%
start https://www.tiktok.com/@%s%
start https://twitter.com/%s%
start https://story.snapchat.com/@%s%
echo This is the History > History.txt
echo %s% >> History.txt
它不會保存用戶名,因為每次它都會洗掉所有內容然后添加一個標題
我希望他只在第一次創建檔案時添加標題
uj5u.com熱心網友回復:
試試這個代碼:
@echo off
Title Searching account
set /p s=Enter the name of the account you want to search for:
If Not Exist "%~dp0History.txt" (echo This is the History)>"%~dp0History.txt"
If Exist "%~dp0History.txt" (echo %s%)>>"%~dp0History.txt"
start https://www.facebook.com/%s%
start https://www.instagram.com/%s%
start https://www.tiktok.com/@%s%
start https://twitter.com/%s%
start https://story.snapchat.com/@%s%
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/360581.html
上一篇:如果檔案被編輯,我如何在bat檔案中呼叫resgen?
下一篇:批處理腳本|命令運行時閃爍螢屏
