1. John Brown
  2. PowerBuilder
  3. Monday, 18 April 2022 16:34 PM UTC

 

I have a block of code that fails in one instance, but not in another instance ...

It's the exact same piece of code.

My non-version controlled runs without issue.

My version controlled issue fails. ( significantly longer path to this file )

 

This is the statement that fails { I replace the file name }

IF FileExists("..\bin\filename") THEN

 

Could the path be too long in one instance?  That's the only thing I can think of.  I've verified that all the files are where they are supposed to be.

 

Additional question here :

I've been doing PB development for 26 years .. I've never seen someone use ".." in their path.  What does that reference?

I've always seen the entire path declared.

 

Thanks!

- John

 

 

 

mike S Accepted Answer Pending Moderation
  1. Monday, 18 April 2022 17:15 PM UTC
  2. PowerBuilder
  3. # 1

..\ 

means to go up one level from the current directory.  open command prompt and type:  DIR ..\ 

 

 

 

 

Comment
  1. John Brown
  2. Monday, 18 April 2022 17:24 PM UTC
Thanks. I had come across that in doing some research, but I still don't see how that's useful in code usage. For example, in this case, that file exists in 3 different location - bin folders. So, even going up one level on the path doesn't clarify much. I can't even tell where exactly it's trying to look for the file.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.