China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-31 21:21
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Experts, please give a batch script to judge the hard disk partition situation View 2,693 Replies 11
Original Poster Posted 2006-11-08 12:25 ·  中国 天津 河东区 联通
初级用户
Credits 22
Posts 9
Joined 2006-11-08 08:43
19-year member
UID 70014
Gender Male
Status Offline
I want to make a simple batch to backup the virus database of Kaba 6
@ echo off
color 7c
echo.
echo.
echo. Welcome to use Kaspersky 6 Virus Database Backup Program
echo.
rem.
rem.
rem.
echo =========================================
echo Close your eyes and rest, it will be done soon
echo =========================================

rd d:\avp6 /s /q
md d:\avp6
md d:\avp6\Bases
md d:\avp6\Data
md d:\avp6\Dskm
echo Backup directory established
cd %ALLUSERSPROFILE%\Application Data\Kaspersky Lab\AVP6
%systemdrive%
xcopy bases d:\avp6\bases
xcopy data d:\avp6\Data
xcopy dskm d:\avp6\Dskm
cls & echo Kaspersky 6 Virus Database Backup Completed

But in actual use, I thought about the lack of universality. If there is a hidden partition on the hard drive or there is only one partition, there are still many problems. This is just a rough draft.
It's just stuck on the judgment of the hard drive. Elders, please give some pointers!
Floor 2 Posted 2006-11-08 12:30 ·  中国 天津 河东区 联通
初级用户
Credits 22
Posts 9
Joined 2006-11-08 08:43
19-year member
UID 70014
Gender Male
Status Offline
Additionally, I want to use the command-line parameters of Kaspersky 6 to manually import settings to disable Kaspersky 6 self-protection, then import the registry of the virus database update directory, and then import optimized settings and enable self-protection. However, after trying for a long time according to the command-line instructions of Kaspersky 6, when exporting, when importing, I need to enter the Kaspersky 6 program password setting! I wonder if there are any good tricks!
Floor 3 Posted 2006-11-08 13:53 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline

  I didn't understand what the original poster meant...
Floor 4 Posted 2006-11-08 21:05 ·  中国 天津 河东区 联通
初级用户
Credits 22
Posts 9
Joined 2006-11-08 08:43
19-year member
UID 70014
Gender Male
Status Offline
I want to determine the partition situation of the computer hard disk and use this to handle the location of the backup directory!
Floor 5 Posted 2006-11-08 22:29 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
Kaspersky 6 Virus Database Backup Program
xcopy /d/y "%ALLUSERSPROFILE%\Application Data\Kaspersky Lab\AVP6" d:\avp6\Bases
Update Kaspersky 6 Virus Database
"%ALLUSERSPROFILE%\Application Data\Kaspersky Lab\AVP6\avp.com" UPDATE d:\avp6\Bases
Floor 6 Posted 2006-11-08 23:10 ·  中国 广东 肇庆 四会市 电信
中级用户
★★
Credits 384
Posts 189
Joined 2005-10-19 13:12
20-year member
UID 43709
Gender Male
Status Offline
The meaning of the poster should be that he wants to use batch processing to automatically judge how many partitions the hard disk has been divided into, and then carry out more flexible backups according to the obtained results, right?
Floor 7 Posted 2006-11-09 05:54 ·  中国 天津 河东区 联通
初级用户
Credits 22
Posts 9
Joined 2006-11-08 08:43
19-year member
UID 70014
Gender Male
Status Offline
Yes!
Moderator of the "Can't Help Loving" version, for AVP6, you only need to back up three folders, no need to back up all.
Bases
Data
Dskm

Your update directory also doesn't have the AVP.COM program
Floor 8 Posted 2006-11-09 06:15 ·  中国 天津 河东区 联通
初级用户
Credits 22
Posts 9
Joined 2006-11-08 08:43
19-year member
UID 70014
Gender Male
Status Offline
Find AVP.COM in the installation directory. But its UPDATE parameter AVP.COM UPDATE D:\AVP6\BASES can't be executed either!
Floor 9 Posted 2006-11-09 06:16 ·  中国 天津 河东区 联通
初级用户
Credits 22
Posts 9
Joined 2006-11-08 08:43
19-year member
UID 70014
Gender Male
Status Offline
The help file doesn't explain about UPDATE. Which version of Card 6 are you using? Have you updated it through this method?!
Floor 10 Posted 2006-11-16 20:33 ·  美国 科罗拉多州 阿拉珀霍 利特尔顿 TW_Telecom控股股份有限公司
初级用户
Credits 35
Posts 18
Joined 2006-04-26 13:31
20-year member
UID 54481
Status Offline
Floor 11 Posted 2006-11-16 21:46 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
Floor 12 Posted 2006-11-23 02:22
中级用户
★★
DOS之日
Credits 337
Posts 161
Joined 2006-11-04 05:27
19-year member
UID 69523
Gender Male
Status Offline
I also care about how to judge the situation of hard disk partitions.
for /f %%h in (`echo hxuan`) do for /f %%x in (`echo hxuan`) do if %%h==%%x nul
Forum Jump: