+ Reply to Thread
Results 1 to 3 of 3

Copying and renaming files based on timestamp VBA

  1. #1
    Registered User
    Join Date
    07-01-2011
    Location
    Milwaukee, Wisconsin
    MS-Off Ver
    MS Office 2010
    Posts
    2

    Copying and renaming files based on timestamp VBA

    Hi all,
    I'm pretty new to using Excel macros and programming in VBA, so I could really use some help. I think I have a fairly complicated problem as well. I have a lot of .txt files that need to be copied from an SD card, renamed, and pasted into certain folders. I don't know if this is possible, but what I need is for the files to be named according the the time stamp associated with each file, or if its possible to organize the files by when they were created and then name them sequentially. I want the macro to prompt the user where the files are on the SD card and where they want the folders to be created. After that, the files need to be pasted into the folders.
    Any help/additional ideas would be greatly appreciated.
    Regards,
    Ben

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Copying and renaming files based on timestamp VBA

    Basically the code to move files:

    If Q is the driveletter of the SD card and E the drive you want the files to be copied to:

    Please Login or Register  to view this content.



  3. #3
    Registered User
    Join Date
    07-01-2011
    Location
    Milwaukee, Wisconsin
    MS-Off Ver
    MS Office 2010
    Posts
    2

    Re: Copying and renaming files based on timestamp VBA

    Quote Originally Posted by snb View Post
    Basically the code to move files:

    If Q is the driveletter of the SD card and E the drive you want the files to be copied to:

    Please Login or Register  to view this content.
    Does that code assume that the name of the file is known? The machine im using to acquire data assigns a random number/letter combination to each file. I was hoping to be able to identify which file I want by entering the time it was created, then extract the data from the SD card. Or to select the 12 newest files created on the SD card and rename those in a specific order.
    Last edited by jr.benk; 07-06-2011 at 01:46 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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