jerran Posted June 2, 2006 Share Posted June 2, 2006 I am in the process of writing a script that will automoatically ftp files from a specific directory to a ftp server - however, the directory contains files with the following names - h*.txt or l*.txt - I have no problem secluding those files from the rest in the script but I need to add a check to make sure that for every H8.txt files there is a matching l*.txt file. For example: Directory contains: htesting.txt script must check for the existance of the matching l file: ltesting.txt If the matching L file doesnot exist, I can just throw a warning and exit the program. Any insite on how that would be accomplished would be very helpfull Thanks, Jer Link to comment Share on other sites More sharing options...
Don N Posted June 2, 2006 Share Posted June 2, 2006 This should be in the support forum but any way, post your existing code and Id be glad to help you work off that. _____________________________________________________"some people live for the rules, I live for exceptions"Wallpaper Changer - Easily Change Your Windows Wallpaper Link to comment Share on other sites More sharing options...
marfdaman Posted June 2, 2006 Share Posted June 2, 2006 This forum is for finished scripts that you want to show to other people. Please post this in the Support forum. Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Link to comment Share on other sites More sharing options...
jerran Posted June 2, 2006 Author Share Posted June 2, 2006 Sorry - it can be moved if neccessary. In the meain time I think I figured it out: While 1 $hfilename = FileFindNextFile($search_filecheck) If @error Then ExitLoop $stripped_filename = StringTrimLeft($hfilename, 1) $stripped_filename = StringTrimRight($stripped_filename, 4) $lfilename = "l"&$stripped_filename&".txt" $check = FileExists($local_sfaorders&$lfilename) If $check = 0 Then GUICtrlSetData ($myedit, $hfilename &" missing "& $lfilename &" match!"& @CRLF,1) EndIf WEnd Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now