捕获特定文件夹中的临时文件创建(capturing temporary file creation in a specific folder)
我正在尝试监视可能创建并快速删除临时文件夹中的文件的程序。 是否有程序或现有脚本会监视这些文件的创建并将它们复制到另一个位置以便我可以查看其内容? 这些文件存在的时间太短,我无法手动复制它们。
I am attempting to monitor a program that may create and quickly delete files in a temporary folder. Is there a program or existing script that would monitor the creation of these files and copy them to another location so that I could view their contents? The files exist for too short of a time for me to copy them manually.
最满意答案
@echo off setlocal enableDelayedExpansion set CHECKDIR=C:\Temp\Check set TARGETDIR=C:\Temp\Backup pushd %CHECKDIR% :loop for /f "delims=" %%f in ('dir /b /a-d-h-s') do ( echo "Copying %TARGETDIR%\%%f" copy %%f %TARGETDIR%\%%f ) goto loop popd @echo off setlocal enableDelayedExpansion set CHECKDIR=C:\Temp\Check set TARGETDIR=C:\Temp\Backup pushd %CHECKDIR% :loop for /f "delims=" %%f in ('dir /b /a-d-h-s') do ( echo "Copying %TARGETDIR%\%%f" copy %%f %TARGETDIR%\%%f ) goto loop popd更多推荐
发布评论