Folder location validation



guys,

how do i check if the folder location the user is entering ends with a
\. and if it does not show and error and if does end with a \ process
the form.

thanks.

.