Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Batch file 使用批处理文件跟踪历史记录_Batch File - Fatal编程技术网

Batch file 使用批处理文件跟踪历史记录

Batch file 使用批处理文件跟踪历史记录,batch-file,Batch File,我如何制作一个批处理文件来跟踪和保存互联网历史(来自google chrome),在我运行CCleaner并通过google chrome清除历史记录后,批处理文件将已经创建了一个文本文件,并且历史记录仍在其中?我需要这是一个批处理文件,将创建和更新关于这个文本文件 批处理代码从这里开始: @echo off echo Welcome to the history tracker! echo Turn on? [1]-Yes [2]-No set /P variable=Enter choic

我如何制作一个批处理文件来跟踪和保存互联网历史(来自google chrome),在我运行CCleaner并通过google chrome清除历史记录后,批处理文件将已经创建了一个文本文件,并且历史记录仍在其中?我需要这是一个批处理文件,将创建和更新关于这个文本文件

批处理代码从这里开始:

@echo off
echo Welcome to the history tracker!
echo Turn on? [1]-Yes  [2]-No
set /P variable=Enter choice:
IF "%variable%"=="1" (GOTO start)
IF "%variable%"=="2" (GOTO end)

:end
echo.

:start
REM I don't know what else to do

这将为您提供所有访问过的站点的列表。不是站点上的单个页面,而是站点。

Chrome将其历史记录存储在SQLite数据库中,因此您需要使用一个具有SQLite脚本接口的程序从批处理中执行此操作。我会用一些已经写好的东西。在批处理文件中编写这将是一个绝对的噩梦,而且很可能太广泛而无法回答,除非有人真的想挑战自己。你确定吗?注意:这会给很多网站,有些你没有意识到你访问过。
@echo off
:top
for /f "delims=: tokens=2" %%i in ('ipconfig /displaydns^|find "Record Name"') do (find "%%i" /i history.txt >nul 2>&1|| echo %%i >>history.txt)
timeout /nobreak 5 >nul 2>&1
sort history.txt /o history.txt
goto top