ho la necessità di eseguire una ricerca di un file senza conoscere la sua destinazione, come procedo?
l' unica cosa che mi viene in mente è :
ma così mi esegue la ricerca nella directory corrente ma se volessi estenderla in tutti i percorsi?codice:If System.IO.File.Exists(My.Computer.FileSystem.FileExists("ore.txt")) Then MsgBox("File found." & vbCrLf & My.Computer.FileSystem.CurrentDirectory & "\ore.txt", MsgBoxStyle.Information, "Trovato") My.Computer.FileSystem.CopyFile(My.Computer.FileSystem.CurrentDirectory & "\ore.txt", Application.StartupPath & "\ore8.txt") MsgBox("Il file è stato trasferito in archivio", MsgBoxStyle.Information, "Fatto") Else MsgBox("File not found.") End If

Rispondi quotando