Hi!
lcFileName = "\\server\sharename\filename.txt"
ADDLISTITEM( STRTRAN(lcFileName, "\", "\\") )
Above will show "\\\server\\sharename\\filename.txt" in the list box instead of "\\server\sharename\filename.txt". Is not it? You require to duplicate just the first backslash, not all backslash characters in the entore string.
>My solution is correct and works as advertised.
>
>>Hi!
>>
>>Thats not correct, because only first backslash will be wanished for disabling status.
>>The workarounds here:
>>1. Add one backslash - iif(left(m.lcFileName,1)=='\','\'+m.lcFileName,m.lcFileName). Than set enabled property to .F. and back to .T. to re-enable all list items.
>>2. Add a space for each list item. This way you get rid problem at all, but beware about trimming (LTrim() or AllTrim()) of that extra leading space.
>>
>>HTH.
>>
>>>>Hello all,
>>>>
>>>>I just ran across something quite strange. I have a table which holds links to files on the network. The table holds the path using UNC path names. i.e. \\server\sharename\filename.txt
>>>>
>>>>When I attempt to do an ADDLISTITEM(Table.FileName) the list item appears as \server\sharename\filename.txt
>>>>
>>>>Does anyone have any idea as to why the first backslash would be truncated?
>>>
>>>You can disable item in the listbox by prefixing it with one backslash "\" .
>>>Because of that you have to double all backslahes in the list item
lcFileName = "\\server\sharename\filename.txt"
>>>ADDLISTITEM( STRTRAN(lcFileName, "\", "\\") )
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.