Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
d.dir(s 2)
#1
Is there any upper limit as fas a string length "s" concerns? For example when path is motre than 160 characters this function does not work. I would appreciate any advice.
#2
Max dir() path length is same as max path length in Windows - 259 characters for files, 247 characters for folders.

http://msdn.microsoft.com/en-us/library ... 85%29.aspx

I used this code to test.
Macro Macro1554
Code:
Copy      Help
str s.expandpath("$desktop$\test\ąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąąžžžžžžžžžž.txt")
;str s.expandpath("$desktop$\test\ččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččččč") ;;folder
;str s.expandpath("$desktop$\test\ą*")
;str s.expandpath("$desktop$\test\č*") ;;folder

out s.len ;;bytes: 490, 470
BSTR b=s; out b.len ;;characters: 259, 247

Dir d
out dir(s 2)

What is your code that does not work?
Make sure that "Unicode" is checked in Options.
#3
Dear Gintaras,

Many thanks indeed. It was my mistake. There was an illegal character among filename's characters.
Your example helped me to debug.

Best regards


Forum Jump:


Users browsing this thread: 1 Guest(s)