Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users
Sub Main() Dim iPOS As Integer Dim strFileOnly As String For Each foundFile As String In My.Computer.FileSystem.GetFiles( "C:\jktemp\") Dim foundFileInfo As New System.IO.FileInfo(foundFile) 'get just file name without extension iPos = 0 iPos = InStr(foundFileInfo.Name, ".") If iPos <> 0 Then strFileOnly = Left(foundFileInfo.Name, iPos - 1) End If If My.Computer.FileSystem.DirectoryExists("C:\jktemp\" & strFileOnly & "\") Then My.Computer.FileSystem.MoveFile(foundFile, "C:\jktemp\" & strFileOnly & "\" & foundFileInfo.Name) End If Next End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.