+ Reply to Thread
Results 1 to 18 of 18

Copy the file in your list and then move to the new folder

  1. #1
    Registered User
    Join Date
    02-01-2017
    Location
    DOHA QATAR
    MS-Off Ver
    2013
    Posts
    26

    Copy the file in your list and then move to the new folder

    Hi there, may I ask your help is it possible that you have excel list in range "A" and it will search to the any folder you want, if the file is there? after that if the list range "A" is match in folder that you assign to search...it will copy or move the file in the new folder or folder you want it to place... thanks for advance

  2. #2
    Forum Guru
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,853

    Re: Copy the file in your list and then move to the new folder

    Place the "Source Directory" on cell A1
    Place the "Target Directory" on cell B1
    Place the list of files on cell A2:Axxx

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by karedog; 02-19-2017 at 08:35 PM. Reason: Added Exit Sub, as suggested by Mr.Yasser Khalil

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,820

    Re: Copy the file in your list and then move to the new folder

    Thanks a lot Mr. Karedog for these wonderful solutions
    Just a little debug may happen ..so exit sub would be put after the messages in these lines
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  4. #4
    Forum Guru
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,853

    Re: Copy the file in your list and then move to the new folder

    Thanks a lot Mr.Yasser Khalil

  5. #5
    Registered User
    Join Date
    02-01-2017
    Location
    DOHA QATAR
    MS-Off Ver
    2013
    Posts
    26

    Re: Copy the file in your list and then move to the new folder

    thank you very much sir

  6. #6
    Registered User
    Join Date
    02-01-2017
    Location
    DOHA QATAR
    MS-Off Ver
    2013
    Posts
    26

    Re: Copy the file in your list and then move to the new folder

    Hi again is it okay a little bit modification for this code Is it better when you run the code it will pop up the C: drive or directory and it will message you which drive or folder you want it to search? after that which folder you wanted to save? is that possible? thanks again

  7. #7
    Forum Guru
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,853

    Re: Copy the file in your list and then move to the new folder

    Place the list of files on cell A1:Axxx
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    02-01-2017
    Location
    DOHA QATAR
    MS-Off Ver
    2013
    Posts
    26

    Re: Copy the file in your list and then move to the new folder

    thank a lot you are the star

  9. #9
    Forum Guru
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,853

    Re: Copy the file in your list and then move to the new folder

    You are welcome.

    Don't forget to mark this thread as solved :
    please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  10. #10
    Registered User
    Join Date
    02-01-2017
    Location
    DOHA QATAR
    MS-Off Ver
    2013
    Posts
    26

    Re: Copy the file in your list and then move to the new folder

    sorry another question I try the other option that Kill fold(0) & arr(i, 1) is working but its only deleting the file not cut or move the file but anyway its working thanks a lot again

  11. #11
    Forum Guru
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,853

    Re: Copy the file in your list and then move to the new folder

    Don't delete the previous line :
    Please Login or Register  to view this content.
    The "move" operation steps are :
    1. Copy the source file to target file, then
    2. Delete the source file

    So, these two line must come in pair for "move" operation :
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    02-01-2017
    Location
    DOHA QATAR
    MS-Off Ver
    2013
    Posts
    26

    Re: Copy the file in your list and then move to the new folder

    Ok thanks a lot

  13. #13
    Registered User
    Join Date
    02-01-2017
    Location
    DOHA QATAR
    MS-Off Ver
    2013
    Posts
    26

    Re: Copy the file in your list and then move to the new folder

    hi again I want to ask what if your looking for folders not the file same method but from now you will search for folders? thanks again for your help, I appreciate it

  14. #14
    Registered User
    Join Date
    02-01-2017
    Location
    DOHA QATAR
    MS-Off Ver
    2013
    Posts
    26

    Re: Copy the file in your list and then move to the new folder

    what if the file "does not exist" is okay that will put the value on the range "B"

  15. #15
    Forum Guru
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,853

    Re: Copy the file in your list and then move to the new folder

    Should be :
    Please Login or Register  to view this content.

  16. #16
    Registered User
    Join Date
    02-01-2017
    Location
    DOHA QATAR
    MS-Off Ver
    2013
    Posts
    26

    Re: Copy the file in your list and then move to the new folder

    thanks again mate cheers

  17. #17
    Forum Guru
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,853

    Re: Copy the file in your list and then move to the new folder

    You are welcome, glad to help.

    Regards

  18. #18
    Registered User
    Join Date
    02-01-2017
    Location
    DOHA QATAR
    MS-Off Ver
    2013
    Posts
    26

    Re: Copy the file in your list and then move to the new folder

    yes its very helpful, did you see my message? regarding to the same method but from now it will searching for folders thanks again cheer

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 10-21-2016, 05:33 PM
  2. Replies: 1
    Last Post: 10-19-2016, 04:44 PM
  3. Create folder and move files to that folder based on file name
    By biznez in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2016, 06:58 PM
  4. unable to copy / move file from Outlook preview pane to zip folder
    By dgiardina in forum Outlook Formatting & Functions
    Replies: 0
    Last Post: 01-21-2015, 10:31 AM
  5. Replies: 2
    Last Post: 02-10-2014, 11:52 AM
  6. rename & copy *.xls file in the folder then move
    By farrukh in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-13-2011, 12:22 PM
  7. Copy and move file to a new folder: macro
    By mdaga in forum Excel General
    Replies: 2
    Last Post: 04-10-2008, 02:55 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1