Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] - File and Directory Concatenation

Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 18th Mar 2014 18:49 Edited at: 18th Mar 2014 18:59
This function will combine two path strings into one valid path. It basically just removes the need for you to worry about whether the strings end or begin with slashes or not.

pathCombine("C:\Users\Brian","file.txt") = "C:\Users\Brian\file.txt"
pathCombine("C:\Users\Brian\","\Documents\file.txt") = "C:\Users\Brian\Documents\file.txt"

If you have Matrix 16 you can remove my implementation of trimRight$ and it will use the C one.

Login to post a reply

Server time is: 2023-09-22 01:44:43
Your offset time is: 2023-09-22 01:44:43