/ Forside/ Teknologi / Udvikling / VB/Basic / Tip
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
VB/Basic
#NavnPoint
berpox 2425
pete 1435
CADmageren 1251
gibson 1230
Phylock 887
gandalf 836
AntonV 790
strarup 750
Benjamin... 700
10  tom.kise 610
Konverter kort filnavne til langt filnav~
Er bedømt af 2 brugere
Fra : niller
Vist : 532 gange

Dato : 27-11-00 14:25

Konverter fra et kort filnavn til langt filnavn.

Function sLongName(sShortName As String) As String
Dim sTemp As String
Dim sNew As String
Dim iHasBS As Integer
Dim iBS As Integer

If Len(sShortName) = 0 Then Exit Function
sTemp = sShortName
If Right$(sTemp, 1) = "\" Then
sTemp = Left$(sTemp, Len(sTemp) - 1)
iHasBS = True
End If

On Error Goto MSGLFNnofile
If InStr(sTemp, "\") Then
sNew = ""
Do While InStr(sTemp, "\")
If Len(sNew) Then
sNew = Dir$(sTemp, 54) & "\" & sNew
Else
New = Dir$(sTemp, 54)
If sNew = "" Then
sLongName = sShortName
Exit Function
End If
End If
On Error Resume Next
For iBS = Len(sTemp) To 1 Step -1
If ("\" = Mid$(sTemp, iBS, 1)) Then
Exit For
End If
Next iBS
sTemp = Left$(sTemp, iBS - 1)
Loop
sNew = sTemp & "\" & sNew
Else
sNew = Dir$(sTemp, 54)
End If
MSGLFNresume:
If iHasBS Then
sNew = sNew & "\"
End If
sLongName = sNew
Exit Function
MSGLFNnofile:
sNew = ""
Resume MSGLFNresume
End Function



 
 
Bedømmelse

Fra : somar


Dato : 04-11-01 16:07



Bedømmelse

Fra : Rellom


Dato : 11-08-02 16:04



Du har følgende muligheder
Eftersom du ikke er logget ind i systemet, kan du ikke lave en bedømmelse til dette tip.

Hvis du ikke allerede er registreret, kan du gratis blive medlem, ved at trykke på "Bliv medlem" ude i menuen.
Søg
Reklame
Statistik
Spørgsmål : 177416
Tips : 31962
Nyheder : 719565
Indlæg : 6407858
Brugere : 218876

Månedens bedste
Årets bedste
Sidste års bedste