+ Reply to Thread
Results 1 to 5 of 5

String parsing to get name of csv file

  1. #1
    Forum Contributor
    Join Date
    06-20-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    106

    String parsing to get name of csv file

    I have an Access database that links .csv files (comma delimited files) such as Perfect.csv to my database from my computer. I want to string parse by the specific name of the original file from the Backup_Dest to the Copy_Dest.

    The name of the Backup file is 20130715_15_44_Perfect.csv
    Another name of a Backup file could be 20130714_17_16_Perfect.csv

    The name of the Copy file will be Perfect.csv

    There must be a pattern as to why this Backup file is named the way it is...I know that the first digits are 2013 (year) 07 (month) 14 (day).

    (1) I don't know what the digits mean after that. I need to answer that question first before, I can predict what the rest of the files will look like when I string parse.
    (2) I want this code to string parse and copy the files from the Backup folder to Copy files folder in a loop by CurrentDate.
    For example if the CurrentDate = 07/15/2013 it needs to pull the file with this date in the .csv file name.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    06-20-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    106

    Re: String parsing to get name of csv file

    csvFiles.PNG

    Here is a picture of what the csv files look like.

    20130102-09-17-Perfect.csv

    I think another solution would be to hard code these csv file names, example "20130102-09-17-" & stringFileName

    Please help me think of a solution

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: String parsing to get name of csv file

    Hello rmachbitz,

    Welcome to the Forum!

    Is it possible the other numbers are the hour and minute of the file creation in 24 hour time?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Forum Contributor
    Join Date
    06-20-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    106

    Re: String parsing to get name of csv file

    The created time could be the hours and minutes of the csv string. But the time it was recorded is not the same as the string name. So that's not the solution unfortunately.

  5. #5
    Forum Contributor
    Join Date
    06-20-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    106

    Re: String parsing to get name of csv file

    I wrote some code that makes the program work. Ahah!

+ 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. Parsing a string
    By adsxvii in forum Excel General
    Replies: 2
    Last Post: 11-16-2008, 09:07 PM
  2. String parsing
    By bulldawg15 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-10-2007, 12:18 PM
  3. [SOLVED] Parsing a string
    By simonc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-27-2006, 03:15 AM
  4. Need help parsing a string
    By Daminc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-26-2006, 07:53 AM

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