Results 1 to 4 of 4

Thread: Moving Several Files To Several Folders

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Apr 2013
    Posts
    12
    Rep Power
    0

    Moving Several Files To Several Folders

    Hi,
    I need a code to move several files to several folders, I already created one but need to enhance it to avoid encountering "run time error 53" when content(files) of the code is not present in the folder.
    My requirement will be account and destination folder should be harcoded.

    Thanks in advance.

    ofel
    Last edited by galang_ofel; 05-16-2013 at 01:55 PM. Reason: Code Tags

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    Then why don't you just write a line at the start
    Code:
    On Error Resume Next
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  3. #3
    Senior Member
    Join Date
    Jun 2012
    Posts
    337
    Rep Power
    13
    Code:
    sub M_snb()
      c00 = "C:\TEST\"
      c01=  "C:\Documents and Settings\roblesjv\Desktop\SOA RAW DATA\JEMS SOA 2013\SOA MAY 2013\"
    
      if Dir (c00 & "134783000011*.txt")<>"" then name c00 & Dir (c00 & "134783000011*.txt") As c01 & "PNB DUBAI RO\USD -134783000011"
    End Sub

  4. #4
    Junior Member
    Join Date
    Apr 2013
    Posts
    12
    Rep Power
    0
    Hi,
    Thanks a lot problem solved by adding on "error resume next" in the first line of the code

    regards

Similar Threads

  1. Moving Multiple Files From One Folder To Another
    By galang_ofel in forum Excel Help
    Replies: 5
    Last Post: 05-10-2013, 12:43 AM
  2. HOW TO Save Processed Files Into Different Folders
    By DARSHANKmandya in forum Outlook Help
    Replies: 6
    Last Post: 04-10-2013, 07:29 PM
  3. Moving Current Latest Data To New Workbook
    By Terry in forum Excel Help
    Replies: 1
    Last Post: 01-19-2013, 12:37 AM
  4. Replies: 4
    Last Post: 06-07-2012, 09:50 PM
  5. Looping through Each Files and Folders
    By Rajan_Verma in forum Rajan Verma's Corner
    Replies: 0
    Last Post: 04-18-2012, 12:12 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
  •