|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Parsing text filesHi Everyone,
I am creating a vb.net application, and i'm almost done. Except for one problem. I need to be able to change this output: C:\Documents and Settings\fancyj\My Documents\Visual Studio Projects\FileDifferencing\bin\Comparison.ldb into a format that is in another file: /VisualStudioProjects/FileDifferencing/bin/Comparison.ldb So, basically I want to cut the leading folders and include only the subfolder off of the root. Any suggestions? If the start of the path is the official My Documents folder for the user,
you could try something like this. Dim sourcePath As String Dim destPath As String sourcePath = "C:\Documents and Settings\fancyj\My Documents\Visual Studio Projects\FileDifferencing\bin\Comparison.ldb" destPath = Replace(sourcePath, My.Computer.FileSystem.SpecialDirectories.MyDocuments, "") destPath = Replace(destPath, "\", "/") ----- Tim Patrick Start-to-Finish Visual Basic 2005 Show quoteHide quote > C:\Documents and Settings\fancyj\My Documents\Visual Studio > Projects\FileDifferencing\bin\Comparison.ldb > > into a format that is in another file: > > /VisualStudioProjects/FileDifferencing/bin/Comparison.ldb > "Justin Fancy" <justinfa***@gmail.com> schrieb: In addition to the other reply, check out the shared methods of > I am creating a vb.net application, and i'm almost done. Except for one > problem. I need to be able to change this output: > > C:\Documents and Settings\fancyj\My Documents\Visual Studio > Projects\FileDifferencing\bin\Comparison.ldb > > into a format that is in another file: > > /VisualStudioProjects/FileDifferencing/bin/Comparison.ldb > > So, basically I want to cut the leading folders and include only the > subfolder off of the root. 'System.IO.Path' and the 'System.Uri' class. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
How to receive an array of doubles using VB from a C DLL
Question about rounding the decimal Need help re: vb.net windows forms Controlling how Excel starts when using VB.Net Automation Having problems with SetWindowText api DataView Question Event firing order [Newbie] How can I do that ? Ctype Datasource to DataTable .. always empty? Linking with .OBJ object files |
|||||||||||||||||||||||