Jump to content

SFV Check After FTP download

Recommended Posts

Hi, Ive managed to write a script that uses Command_Line_SFV_Checker_v0.1 to check the sfv of files being uploaded to my server by FTP. It searches a folder for an sfv, and then runs recursively until the sfv check passes. It will then email me on file upload completion. Sometimes the folders that are being uploaded contain files with an .sfv directly in them, and sometimes they contain subfolders, which each contain files with an .sfv. The script works great when the files are in the main folder, but im having some issues when there are subfolders.

For Example:

A folder called 'PhotoshopDesigns' is uploaded and contains the subfolders 'cd1' and cd2'. Inside the folder cd1, there is a set of files with an .sfv, and inside cd2 there are a set of files with an .sfv. like:



So when a folder is uploaded to my server by FTP, my script will need to search inside of that folder and If it finds there is an .sfv, then run the sfv check, but if there are subfolders by the names of cd1, cd2, cd3 , then check each of the subfolders and run an sfv check inside each. Only once the sfv checks for each of these subfolders have all passed, then run a script that emails me ( I will write the email script later).

My code so far is:

#include <Constants.au3>

$sfvcheck = "Enfis_SFV.exe -c=G:\PhotoshopFiles\PhotoshopDesigns\particleremovaltests.sfv"

While 1
Sleep (100)
$DOS = Run(@ComSpec & ' /c ' & $sfvcheck, "", @SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD)
$Message = StdoutRead($DOS)
$Missing = StringInStr($Message, " Missing")
Until $Missing = 0
MsgBox(0, "Stdout Read:", $Message)

Any help will be much appreciated :) Thanks for taking the time.

Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...