I was looking for a way to get a relative directory and file path (both) either directly or from a full path. It seems I cannot find a satisfying answer... and I googled a lot.
The problem is that I need to upload files on FTP and i need the format "Hostftp:port/"+"Directory/subdirectory" to create the ftp request
Example
myftp:8008/Users
myftp:8008/Users/Data
myftp:8008/Users/Data/Anagraphics
myftp:8008/Work
etc etc.
I pick the files from my computer so they are like
C:\users\MyPc\UsersData\Users
C:\users\MyPc\UsersData\Users\Data
C:\users\MyPc\UsersData\Users\Data\Anagraphics
C:\users\MyPc\UsersData\Work
I want them listed like
Users
Users\Data
Users\Data\Anagraphics
Work
so I can concatenate the string and make
myftp:8008/Users
myftp:8008/Users/Data
myftp:8008/Users/Data/Anagraphics
myftp:8008/Work
How to do it???