i have excel where in column A contain filename of jpg files i.e. 10001.jpg, 10002.jpg and i have folder that contain lot of images.
Now i want cut only that images which i put in excel file column A and paste it another folder.
pls help me
i have excel where in column A contain filename of jpg files i.e. 10001.jpg, 10002.jpg and i have folder that contain lot of images.
Now i want cut only that images which i put in excel file column A and paste it another folder.
pls help me
Last edited by mohan.r1980; 10-06-2010 at 01:15 AM.
Bump no response
Try this...
Sub Test() Const FileCol = 1 Const FirstDataRow = 1 Const SourcePath = "c:\temp\" Const TargetPath = "c:\temp\test\" Dim LastRow, RowLoop As Range With ThisWorkbook.Sheets(1) LastRow = .Cells(.Rows.Count, FileCol).End(xlUp).Row For Each RowLoop In Range(Cells(FirstDataRow, FileCol), Cells(LastRow, FileCol)).Cells If RowLoop.Value <> "" Then If Dir(SourcePath & RowLoop.Value) <> "" Then FileCopy SourcePath & RowLoop.Value, TargetPath & RowLoop.Value End If End If Next RowLoop MsgBox "Finished file copy" End With End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks