我做了一个批处理脚本,但它似乎有点破损,因为当我运行它时,只有其中一个搜索出现在控制台中。我需要的是一个批处理脚本,它搜索C:\以获取字符串和文件名。这是我的。在计算机上搜索多个项目的批处理文件
@echo off
findstr /m "vape" *.* > vf-log.txt
if %errorlevel%==0 (
echo.
echo Vape strings found.
) else (
echo.
echo No strings found.
)
dir /S C:\vape.* > vf-log.txt
if %errorlevel%==0 (
echo.
echo Vape files found.
) else (
echo.
echo No files found.
)
dir /S C:\harambe.* > vf-log.txt
if %errorlevel%==0 (
echo.
echo Harambe files found.
) else (
echo.
echo No files found.
)
dir /S C:\kurium.* > vf-log.txt
if %errorlevel%==0 (
echo.
echo Kurium files found.
) else (
echo.
echo No files found.
)
dir /S C:\clicker.* > vf-log.txt
if %errorlevel%==0 (
echo.
echo Autoclicker files found.
) else (
echo.
echo No files found.
)
start "" "C:\Users\%USERNAME%\Desktop\vf-log.txt"
pause
我可能做错了什么。
编辑:我现在有这个。 Prefetch中有一个名为VAPE-LAUNCHER的文件,即使我正在使用dir,它也不会启动。帮帮我?
@echo off
echo Loading...
echo.
dir C:\vape*.* /s /b >> vf-log.txt
if %errorlevel%==0 (
echo Files found!
) else (
echo.
echo No files found.
)
start "" "C:\Users\%USERNAME%\Desktop\vf-log.txt"
pause
'''每次都会覆盖你的文件。要追加,使用'>>' – Stephan
它仍然只是表示“Vape Strings Found”,没有其他的东西我告诉它说。另外,我可以使文本文件更清洁吗?这只是一堆东西。 – Quizzed
'Dir c:\ windows \ user *。* C:\ windows \ shell *。*' – 2016-11-13 18:55:08