Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find a valid Name of Folder
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01288621
Message ID:
01288627
Views:
14
Borislav,

Thank , it is very nice !

bernhart

>>Hi all,
>>
>>I want a function to find a valid name of fich to record on HDD.
>>This name of fich is a compagny Name.
>>
>>
>>cCompagnyName = [Résidence "la belle fleur" ( * Sanatorium ) ]
>>Must be
>>cCompgnyFich = [Résidence la belle fleur ( Sanatorium ) ]
>>
>>
>>
>>Thank in advance for help
>>
>>Bernhart
>
>Write your own where remove all BAD chars:
>
>
>cCompagnyName = [Résidence "la belle fleur" ( * Sanatorium ) ]
>?ValidFolderName(cCompagnyName)
>
>FUNCTION ValidFolderName(lcFolderName)
>
>LOCAL lcBadChars
>lcBadChars = ["'*?/\] && Add all chars you want to remove here
>lcFolderName = CHRTRAN(lcFolderName,lcBadChars,[])
>DO WHILE AT([  ], lcFolderName) # 0 && Remove all double spaces
>   lcFolderName = STRTRAN(lcFolderName,[  ],[ ])
>ENDDO
>RETURN lcFolderName
>
Previous
Reply
Map
View

Click here to load this message in the networking platform