Results 1 to 6 of 6

Thread: Moving Multiple Files From One Folder To Another

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Moderator
    Join Date
    Jul 2012
    Posts
    156
    Rep Power
    14
    Maybe something like this
    Code:
    Sub Copy_Payroll_Files()
    zSourceFolder = "C:\RCI_FILES\SOA\2013\2013_03_AGENTS\"
    For Each it In Array("234446500579*.txt", "234446500155*.txt", "234446500676*.txt", "234446500456*.txt", "234446500511*.txt", "234446500391*.txt", "234446500587*.txt", _
                        "234446500341*.txt", "234446500309*.txt", "234446500634*.txt", "234446500317*.txt", "234446500480*.txt", "234446500464*.txt", "234446500325*.txt", _
                        "234446500260*.txt", "234446500406*.txt", "234446500642*.txt", "234446500090*.txt", "234446500139*.txt", "234446500147*.txt", "234446500197*.txt", _
                        "234446500074*.txt", "234446500113*.txt", "234446500684*.txt", "234446500032*.txt", "234446500498*.txt", "234446500799*.txt", "234446500503*.txt", _
                        "234446500252*.txt", "234446500715*.txt", "234446500820*.txt", "234446500375*.txt", "234446500294*.txt", "234446500472*.txt", "234446500189*.txt", _
                        "234446500163*.txt", "234446500367*.txt", "234446500626*.txt", "234446500765*.txt", "234446500618*.txt", "234446500561*.txt", "234446500707*.txt", _
                        "234446500105*.txt", "234446500082*.txt", "234446500016*.txt", "234446500121*.txt", "234446500171*.txt", "234446500202*.txt", "234446500210*.txt", _
                        "234446500228*.txt", "234446500244*.txt", "234446500278*.txt", "234446500286*.txt", "234446500333*.txt", "234446500359*.txt", "234446500383*.txt", _
                        "234446500414*.txt", "234446500422*.txt", "234446500430*.txt", "234446500448*.txt", "234446500529*.txt", "234446500595*.txt", "234446500600*.txt", _
                        "234446500600*.txt", "234446500650*.txt", "234446500668*.txt", "234446500692*.txt", "234446500723*.txt", "234446500731*.txt", "234446500749*.txt", _
                        "234446500757*.txt", "234446500773*.txt", "234446500781*.txt", "234446500812*.txt")
        If Dir(zSourceFolder & it) <> vbNullString Then
            With CreateObject("Scripting.FileSystemObject")
                .movefile zSourceFolder & it, "c:\RCI_FILES\SOA\2013\2013_03_AGENTS\php"
            End With
        End If
    Next
    End Sub
    Last edited by bakerman; 05-10-2013 at 02:00 PM.

Similar Threads

  1. Moving Several Files To Several Folders
    By galang_ofel in forum Excel Help
    Replies: 3
    Last Post: 06-01-2013, 04:21 PM
  2. Save Processed Files Into Different Another Folder
    By DARSHANKmandya in forum Excel Help
    Replies: 1
    Last Post: 03-22-2013, 07:10 PM
  3. Replies: 2
    Last Post: 03-12-2013, 02:57 PM
  4. Replies: 2
    Last Post: 09-24-2012, 09:20 PM
  5. List Of All Files In A Folder
    By Excel Fox in forum Excel Help
    Replies: 2
    Last Post: 10-27-2011, 09:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •