使用批处理脚本从文件大小计算的数据对某些人来说是负面的,对某些人来说是正面的

时间:2017-07-18 13:39:41

标签: batch-file command-line cmd batch-processing fat32

我有一个用于数据计算的批处理脚本,但数据不常见。即使限制是32位,但即使是更少它的负数。请帮忙。

以下是脚本

forfiles /p "V:\DVRelease\SLR\ScanTransfer\Export\Archive" /s /d -90 /c "cmd /c echo @fsize & del /Q @file">>V:\DVRelease\CalculationFile.txt

forfiles /p "V:\DVRelease\SLR\ScanTransfer\Import\Log" /s /d -90 /c "cmd /c echo @fsize & del /Q @file">>V:\DVRelease\CalculationFile.txt

forfiles /p "V:\DVRelease\SLR\ScanTransfer\Import\Archive" /s /d -90 /c "cmd /c echo @fsize & del /Q @file">>V:\DVRelease\CalculationFile.txt

forfiles /p "V:\DVRelease\SLR\ScanTransfer\Import\Temp" /s /d -90 /c "cmd /c echo @fsize & del /Q @file">>V:\DVRelease\CalculationFile.txt

forfiles /p "V:\DVRelease\SLR\ScanTransfer\Import\New folder" /s /d -90 /c "cmd /c echo @fsize & del /Q @file">>V:\DVRelease\CalculationFile.txt

forfiles /p "V:\DVRelease\SLR\ScanTransfer\Import\Investigating" /s /d -90 /c "cmd /c echo @fsize & del /Q @file">>V:\DVRelease\CalculationFile.txt

forfiles /p "V:\DVRelease\SLR\SLR" /s /d -90 /c "cmd /c echo @fsize & del /Q @file">>V:\DVRelease\CalculationFile.txt

forfiles /p "V:\DVRelease\SLR\Trigger\Scanning\logs" /s /d -90 /c "cmd /c echo @fsize & del /Q @file">>V:\DVRelease\CalculationFile.txt

forfiles /p "V:\DVRelease\SLR\Working\logs\Category" /s /d -90 /c "cmd /c echo @fsize & del /Q @file">>V:\DVRelease\CalculationFile.txt

forfiles /p "V:\DVRelease\SLR\Working\logs\Dirmon" /s /d -90 /c "cmd /c echo @fsize & del /Q @file">>V:\DVRelease\CalculationFile.txt

forfiles /p "V:\DVRelease\SLR\Working\logs\PermDocs" /s /d -90 /c "cmd /c echo @fsize & del /Q @file">>V:\DVRelease\CalculationFile.txt

forfiles /p "V:\DVRelease\SLR\Working\logs\Transfer" /s /d -90 /c "cmd /c echo @fsize & del /Q @file">>V:\DVRelease\CalculationFile.txt

forfiles /p "V:\DVRelease\SLR\Working\logs\XMLImport" /s /d -90 /c "cmd /c echo @fsize & del /Q @file">>V:\DVRelease\CalculationFile.txt

forfiles /p "V:\CMI\SLR\CASENOTESLOG" /s /d -90 /c "cmd /c echo @fsize & del /Q @file">>V:\DVRelease\CalculationFile.txt

forfiles /p "V:\CMI\SLR\IN\ARCHIVE" /s /d -90 /c "cmd /c echo @fsize & del /Q @file">>V:\DVRelease\CalculationFile.txt

forfiles /p "V:\CMI\SLR\LOG" /s /d -90 /c "cmd /c echo @fsize & del /Q @file">>V:\DVRelease\CalculationFile.txt

forfiles /p "V:\CMI\SLR\OUT\BUFFER" /s /d -90 /c "cmd /c echo @fsize & del /Q @file">>V:\DVRelease\CalculationFile.txt

forfiles /p "V:\CMI\TrackDocument" /s /d -90 /c "cmd /c echo @fsize & del /Q @file">>V:\DVRelease\CalculationFile.txt

set sz=0

for /F %%a IN (V:\DVRelease\CalculationFile.txt) do set /a "sz=sz+%%a"

echo %date% size Deleted: %sz% Bytes>> V:\DVRelease\DataPurgingLog.txt

echo 0 > V:\DVRelease\CalculationFile.txt
16/06/2017 size: 95688908 Bytes 17/06/2017 size: 190699856 Bytes
18/06/2017 size: 288026688 Bytes 19/06/2017 size: 738941927 Bytes
20/06/2017 size: 1318320513 Bytes 21/06/2017 size: 2027242389 Bytes
22/06/2017 size: -1658242847 Bytes 23/06/2017 size: -1081463106 Bytes
24/06/2017 size: -1081679150 Bytes 25/06/2017 size: -1076557226 Bytes
26/06/2017 size: -234336671 Bytes 27/06/2017 size: 472276127 Bytes
28/06/2017 size: 1397077743 Bytes 29/06/2017 size: 2136536561 Bytes
30/06/2017 size: -1182863157 Bytes 01/07/2017 size: -1183067763 Bytes
02/07/2017 size: -1180564003 Bytes 03/07/2017 size: -337979418 Bytes
04/07/2017 size: 696381662 Bytes 05/07/2017 size: 1161459262 Bytes
06/07/2017 size: 1846180236 Bytes 07/07/2017 size: -1876917405 Bytes
08/07/2017 size: -1877018504 Bytes 09/07/2017 size: -1873607886 Bytes
10/07/2017 size: -1127889677 Bytes 11/07/2017 size: -561964370 Bytes

12/07/2017 size: 15054159 Bytes
13/07/2017 size: 552787929 Bytes
14/07/2017 size: 552787929 Bytes
15/07/2017 size: 552787929 Bytes
16/07/2017 size: 552788030 Bytes
17/07/2017 size: 556373062 Bytes

0 个答案:

没有答案