Oppure

Loading
14/11/06 18:27
Private Sub btnapri_Click()
ultimospazio = False
Path = ""
On Error GoTo fine
Path = txtfile.Text
txtfile.Text = ""
Open Path For Input As #1
Do
Line Input #1, Linea
File = File & Linea
Loop Until EOF(1) = True
Close #1
Path = ""
Text1.Text = File
Exit Sub


fine:
Close #1
MsgBox Err.Description
End Sub



la versione col mid è grezza cioè non è pronta ma si tratta +o- di questo

Private Sub btnapri_Click()
ultimospazio = False
Path = ""
On Error GoTo fine
Path = txtfile.Text
txtfile.Text = ""
Open Path For Input As #1
Do
Line Input #1, Linea
File = File & Linea
Loop Until EOF(1) = True
Close #1
Path = ""
Text1.Text = File
[b]For X = 1 To Len(File)
    If Mid(File, X, 3) = "C:\" Then
        For K = X To Len(File)
        
        
            If Mid(File, K, 1) = "." Then
                ultimospazio = True
                Path = Path & Mid(File, K, 1)
            Else
                If ultimospazio = True Then
                If Mid(File, K, 1) = " " Then
                    txtfile.Text = Path
                    GoTo theend
                End If
                End If
                    Path = Path & Mid(File, K, 1)

            End If
            
            
            
        Next K
    End If

Next X
theend:[/b]
Exit Sub


fine:
Close #1
MsgBox Err.Description
End Sub
Ultima modifica effettuata da 14/11/06 21:35
15/11/06 13:36
maffo23
Ok....grazie....
cmq in alcuni lnk non trova niente
aaa
15/11/06 17:27
hai provato col primo codice?
16/11/06 13:43
maffo23
certo......
aaa
16/11/06 14:44
spediscimi il link per e-mail che lo analizzo.
così riuscirò a migliorare il codice.
18/11/06 14:59
maffo23
6 1 genio...........
aaa
18/11/06 15:57
è difficile isolare il percorso!!!
19/11/06 14:10
maffo23
no..perkè.....poi usa

NAME percorso AS newpercorso

per rinominare i file lnk....in txt o quello che vuoi
aaa