Jump to content

Tidier, now with added antivirus?


Recommended Posts

Following on from this thread, I have the following code.

$activedir = IniRead("C:\program files\Tidier\tidy.ini", "dir", "active", "ValueNotFound")
FileChangeDir($activedir)
$music = IniRead("C:\program files\Tidier\tidy.ini", "types", "music","ValueNotFound")
$musicdir = IniRead("C:\program files\Tidier\tidy.ini", "dir", "music", "valuenotfound")
$pics = IniRead("C:\program files\Tidier\tidy.ini", "types", "pics","ValueNotFound")
$picsdir = IniRead("C:\program files\Tidier\tidy.ini", "dir", "pics", "valuenotfound")
$docs = IniRead("C:\program files\Tidier\tidy.ini", "types", "docs","ValueNotFound")
$docsdir = IniRead("C:\program files\Tidier\tidy.ini", "dir", "docs", "valuenotfound")
$process = IniRead("C:\program files\Tidier\tidy.ini", "process", "processname", "ValueNotFound")
$delay= Iniread("C:\program files\Tidier\tidy.ini", "process", "delay", "ValueNotFound")
while ProcessExists($process)
$musicArray = StringSplit ( $music, "|" )
For $m = 1 To $musicArray[0]
   FileMove($musicArray[$m], $musicdir)
Next
$picsarray = StringSplit ( $pics, "|")
For $p = 1 To $picsarray[0]
   FileMove($picsarray[$p], $picsdir)
Next
$docsarray = StringSplit ( $docs, "|")
For $d = 1 To $docsarray[0]
   FileMove($docsarray[$d], $docsdir)
Next
Sleep($delay)
WEnd

I have the command line syntax for the antivirus ready. My question is, how can I make the script either a] scan each individual file right after it gets moved (probably a major hassle and not worth the effort) or b] make it call AVG to scan each folder individually, every hour or so? I tried adding the command after the last Next, with a Sleep($delay) in it, but it spawned 30 or so copies of AVG before I managed to close it down.

Edited by Solomon
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...