Search Tools Links Login

Convert UNIX files to DOS files and vice versa

This code converts UNIX files to DOS files and DOS files to UNIX files

Original Author: David Gabrielsen


the text to be converted


This code has 2 Functions. One function that takes a DOS string as argument and returns a UNIX string, and one function that takes a UNIX string as argument and returns a DOS string.


UNIX or DOS text

Side Effects

absolutely none


Private Function convertDOStoUNIX(DOSstring As String) As String
convertDOStoUNIX = Replace(DOSstring, vbCrLf, vbLf, 1, Len(DOSstring), vbTextCompare)
End Function
Private Function convertUNIXtoDOS(UNIXstring As String) As String
convertUNIXtoDOS = Replace(UNIXstring, vbLf, vbCrLf, 1, Len(UNIXstring), vbTextCompare)
End Function

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 105 times


Visual Basic 6


No attachments for this post

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.