Forum Discussion
joffre
14 years agoRegular Contributor
Hi,
I'd suggest that you run your script step by step and check the exact parameter values (evaluate things like Path&"\01 - LGComponentes" and see the evaluation results) and monitor the changes in the directory structure on each step. This will help you to narrow the problem down and make sure that everything is OK with the values you use.
Also, what exact TC version are you using?
Jared,
My TC's version is 7.52
I'd do what Jared said because I just set up an environment with the exact same directory structure and file name, copy and pasted your script, and ran it and it does exactly what it's supposed to do.
I'm at a loss at this point. The only things I can think of is that there's some sort of permission deal with one of the folders that TestComplete is not allowed access to alter it. Either that, or you have one of the files still locked as open, especially if it has been edited and altered by TestComplete and then not closed by TestComplete.
Sorry, not much help from here.
Robert,
I'm sure that no folders or files that I'm trying to alter with my script is openned. About permission, I don't know what to think... I'll try to do this in another directory and will let you know if it worked or not.
______
Now, another doubt (you might hate me):
I'm trying to compare two files contents. Both have numbers varying from 1 to 10000.
I'm using this code:
Sub CompareStrings
PathLogsCreate = "D:\Scripts\Logs\SQL\SQL2K\LogsCreate"
PathLogsFinais = "D:\Scripts\Logs\SQL\SQL2K\LogsFinais"
s = aqString.Compare(pathLogsCreate&"\1-1.txt", pathLogsFinais&"\1-1.txt", 0)
If (s <> 0) Then
Log.Error(s)
Else
Log.Message(s)
End If
End Sub
Both files have the number "2" on it. And just it.
So, it should return the value "0", right? But it is returning "-1"... How can I fix it?
Or the idea of aqString.Compare isn't that?