Author Topic: Command-Line Scanner  (Read 3437 times)

0 Members and 1 Guest are viewing this topic.

tk4two1

  • Guest
Command-Line Scanner
« on: September 24, 2004, 08:06:09 PM »
If I want to use the command line scanner to scan a directory, delete any viruses and close.  What command would i put in?
If the directory that I wanted to scan was c:\vscan would the command be?
Code: [Select]
ashcmd c:\vscanor will that only scan?  If so what command will delete any viruses?

Thanks

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67194
Re:Command-Line Scanner
« Reply #1 on: September 24, 2004, 08:28:06 PM »
Are you using the Professional version or just the Trial one?

The ashCmd Parameters and Switches are:

Example: "C:\Program files" /p /u=virus@asw.cz --soundoff /v="key kapt"

d:\path
This parameter specifies the drive and directory that should be tested. If the parameter is not given, files in the root directory of the current drive are scanned. It is possible to specify more drives simultaneously.

d:\path\file
When the full pathname of a file is given, ashCmd scans this one file only. The file must exist!

/H or /?   (or --help)
Prints brief help and the list of possible switches.

/#   (or --remote)
Scans remote disks.

/*   (or --local)
Scans local hard disks.

/_>   (or --console)
The application will be ready for STDIN/STDOUT. All the output will be redirected to the standard output (STDOUT). It means that the output can be processed in various UNIX-style command-line tools.

/A   (or --testall)
Tests all files.

@<task name>   (or --task)
Starts an avast! task of given name. All the other parameters are ignored. If the task name contains any spaces, it must be enclosed in quotes.

/C   (or --testfull)
Switches scanning of whole files on. By default, only the important parts of the files are tested, which is much faster. When any virus is found, the program switches to scanning the whole files automatically.

/I   (or --ignoretype)
Switches searching for all viruses in all files on (i.e. boot viruses will be looked for even in EXE files etc.).

/J   (or --paging)
Pages the lines if the program is not in STDOUT mode (i.e. stops after each full page of results).

/M   (or --boot)
Tests boot sectors and the operating memory.

/P   (or --continue)
This switch specifies that the program will run without any delays after checking the disk system areas and without waiting for user interaction when a virus is found. To check the result of the scan, you can use predefined return codes, or information stored in a report file. To specify an automatic action with the infected files, use /P=[1234], where 1 = delete file, 2 = move to Chest, 3 = repair, 4 = stop.

/R=* [file name]   (or --report)
This switch specifies that a text file will be created with the list of viruses found and a summary table (report file). If the file name is not given, ASHCMD.RPT in the current directory is used for output. When the switch /R is followed by the "*" character, all the scanned files will be written to the report file (even the ones where no virus was detected).

/S   (or --soundoff)
This switch turns the virus sound alert off. By default, any virus found is announced by a beep.

/U=<address>   (or --sendmessage)
If a virus is found, a warning message is sent to the given address.

/V=[first characters of the virus name]   (or --viruslist)
The ashCmd program prints its current virus database (i.e. the list of viruses it can find) and terminates.

/T=[JZIMXRSTLCBWOEQHAN]   (or --archivetype)
Specifies the type of archives to scan (J:ARJ, Z:ZIP, I:MIME, M:MAPI, X:Exec, R:RAR, S:Streams, T:TGZ, L:LNK, C:CAB, B:BZIP2, W:WinExec, O:ZOO, E:ACE, Q:ARC, H:LHA, A:All, N:none).
« Last Edit: September 24, 2004, 08:30:32 PM by Technical »
The best things in life are free.

tk4two1

  • Guest
Re:Command-Line Scanner
« Reply #2 on: September 24, 2004, 10:08:09 PM »
I am using the pro version. I have already read the commands but am having a hard time figuring out if it just scans for viruses or if it scans and deletes. Unless I use this command
Code: [Select]
ashcmd c:\vscan /p1Would this be what I am trying to do?
« Last Edit: September 24, 2004, 10:11:39 PM by tk4two1 »

Offline igor

  • Avast team
  • Serious Graphoman
  • *
  • Posts: 11849
    • AVAST Software
Re:Command-Line Scanner
« Reply #3 on: September 29, 2004, 09:39:47 AM »
It should be
Code: [Select]
ashcmd c:\vscan /p=1