PDA

View Full Version : Check\Remove trailing backslash



Tom H.
11-03-2011, 11:57 AM
Is there a built-in function to check for and remove trailing backslashes in a path/filename?

In Wise that was one of the options on the standard SET variable function, but I don't see the equivalent in SB7 (running the latest.)

Thanks,
Tom

linder
11-03-2011, 12:20 PM
Hi Tom,

"Handle String Operation (Validate Path)" should do it.

Does this help?

Friedrich

Tom H.
11-03-2011, 09:54 PM
Actually, I finally found the 'Rslash' option in the 'Handle String...' function that did what I want after more digging around.

I just needed to accommodate the outliers, like someone selecting a root directory. In that case, SB7 sets the install folder is set to (for example) "E:\", whereas selecting any other subfolder sets the install folder to "E:\MyFolder" (note no backslash.)

Thanks again,
Tom