捕获特定文件夹中的临时文件创建(capturing temporary file creation in a specific folder)

编程入门 行业动态 更新时间:2024-10-20 18:51:40
捕获特定文件夹中的临时文件创建(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

更多推荐

本文发布于:2023-04-27 23:01:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1329695.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:临时文件   文件   夹中   capturing   temporary

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!