Here is what i am going to run with, Just incase you where intrested.
Cells D1-E1 must cointain text, and must not contain illegal charters /-? ect
Note this will delete the original file after it is placed into the new folder.
Option Explicit
Sub Move_DeleteFiles()
Dim var_File
Dim int_FileCount As Integer
Dim str_Folder As String
Dim rng_Cell
var_File = Application.GetOpenFilename _
(Title:="Please select the Files you wish to import.", _
MultiSelect:=True)
If IsArray(var_File) Then
For int_FileCount = 1 To UBound(var_File)
Cells(int_FileCount, 1).Value = var_File(int_FileCount)
Cells(int_FileCount, 2).Value = FileNameWithExt(Cells(int_FileCount, 1).Value)
Cells(int_FileCount, 3).Value = FileLen(var_File(int_FileCount)) & " bytes"
Next int_FileCount
End If
str_Folder = "C:\" & Cells(1, 4).Value & " " & Cells(1, 5).Text
If Dir(str_Folder) <> "" Then
MkDir str_Folder
End If
For Each rng_Cell In Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row)
FileCopy rng_Cell.Value, str_Folder & "\" & rng_Cell.Offset(0, 1).Value
Kill rng_Cell.Value
ActiveSheet.Hyperlinks.Add _
Anchor:=rng_Cell, _
Address:=str_Folder & "\" & rng_Cell.Offset(0, 1).Value, _
TextToDisplay:=rng_Cell.Offset(0, 1).Value
Next rng_Cell
ActiveSheet.Hyperlinks.Add _
Anchor:=Cells(1, 1)(Rows.Count).End(xlUp).Offset(1, 0), _
Address:=str_Folder & "\", _
TextToDisplay:="Open Contaning Folder"
Cells(1, 1)(Rows.Count).End(xlUp).Offset(1, 0).Value = int_FileCount - 1 _
& " Image Attachments"
End Sub
Function FileNameWithExt(strPath As String) As String
FileNameWithExt = Mid$(strPath, InStrRev(strPath, "\") + 1)
End Function
Bookmarks