+ Reply to Thread
Results 1 to 3 of 3

Cutting & Moving A file

  1. #1
    Registered User
    Join Date
    06-08-2012
    Location
    isnorte daere
    MS-Off Ver
    Excel 2010
    Posts
    49

    Cutting & Moving A file

    I'm currently using VBA to copy and paste a group of files from 1 folder to another. The folder contains logs everytime a certain report is accessed, so it is constantly updating with new files. I've already figured out how to merge all individual files in a folder into 1 single workbook sheet. But what I'm trying to do is have the VBA cut the files from their original location and then paste them in a new folder, so that everytime I move the files VBA doesn't attempt to move all files, including old ones.. Does anyone know what code I can use to do this?

    Please Login or Register  to view this content.
    Last edited by jablo1312; 05-14-2014 at 03:56 PM.

  2. #2
    Registered User
    Join Date
    06-08-2012
    Location
    isnorte daere
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Cutting & Moving A file

    I was able to solve this problem as well. Its pretty simple, all that needs to be done is to replace the word "copy" in the following script with"move"

    Please Login or Register  to view this content.
    This will take all files in the "FromPath" folder and move them to the "ToPath" folder, while also removing them from the "Frompath" folder.

  3. #3
    Registered User
    Join Date
    06-08-2012
    Location
    isnorte daere
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Cutting & Moving A file

    I was able to solve this problem as well. Its pretty simple, all that needs to be done is to replace the word "copy" in the following script with"move"

    Please Login or Register  to view this content.

    So that it looks like this:
    Please Login or Register  to view this content.
    This will take all files in the "FromPath" folder and move them to the "ToPath" folder, while also removing them from the "Frompath" folder.

+ 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. [SOLVED] cutting file name in parts
    By Megatronixs in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 11-18-2014, 10:33 AM
  2. cutting and moving a row based on a value in a cell
    By Crangiopharengoma in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-08-2013, 06:51 AM
  3. Replies: 7
    Last Post: 07-09-2010, 09:57 AM
  4. Replies: 4
    Last Post: 03-28-2005, 05:06 PM
  5. Replies: 7
    Last Post: 03-27-2005, 08:06 PM

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