+ Reply to Thread
Results 1 to 14 of 14

bulk convert strange file format in multiple folders.

  1. #1
    Forum Contributor
    Join Date
    06-13-2008
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    277

    bulk convert strange file format in multiple folders.

    Hi Guys,

    I have a series of files in *.ew7 format (i know its a random program)

    I have some code which i can run which will simply open the relevant file and save it as xls.

    The files are saved in multiple folders in format "yymm" eg: 0910 - oct 09.

    inside each folder there is a ew7 file for each day in rthe format: "01ddmmyy" eg 01271009 = 27th oct 2009.

    I have folders going back as far as may 2002 (in folder 0205) and i need a way to convert these all into xls format and save them in the same location.

    Please Login or Register  to view this content.
    This is the code im currently using but this will only conver the date currently being looked at (ie: today) is there a way i can run a macro which will do this for all historical files?

    many thanks
    Last edited by freud1; 11-03-2009 at 11:27 AM.

  2. #2
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163

    Re: bulk convert strange file format in multiple folders.

    Oops, wrong post.
    Last edited by Rick_Stanich; 10-27-2009 at 09:40 AM.
    Regards

    Rick
    Win10, Office 365

  3. #3
    Forum Contributor
    Join Date
    06-13-2008
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    277

    Re: bulk convert strange file format in multiple folders.

    lol no worries

  4. #4
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163

    Re: bulk convert strange file format in multiple folders.

    Do you have a couple ew7 files you can attach for testing?

  5. #5
    Forum Contributor
    Join Date
    06-13-2008
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    277

    Re: bulk convert strange file format in multiple folders.

    hi rick, thanks for getting back to me,

    unfortunately ew7 files cannot be uploaded here.

    the code i uploaded works perfectly to convert the file for today, i just need to know how to loop it and increment the values so it saves the correct names to the correct files.

  6. #6
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163

    Re: bulk convert strange file format in multiple folders.

    Quote Originally Posted by freud1 View Post
    hi rick, thanks for getting back to me,

    unfortunately ew7 files cannot be uploaded here.

    the code i uploaded works perfectly to convert the file for today, i just need to know how to loop it and increment the values so it saves the correct names to the correct files.
    Sure you can, put a couple in a ZIP file, 9.7mb limit. Strip the files down to a few rows/cols, I only need to work with samples.

    Let me get this straight now.
    You only need to convert one file at a time but it might be in different folders?

  7. #7
    Forum Contributor
    Join Date
    06-13-2008
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    277

    Re: bulk convert strange file format in multiple folders.

    hi rick,

    i uploaded one on a previous thread which was for a slightly different solution.

    does this help?

    http://www.excelforum.com/excel-gene...ge-format.html

  8. #8
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163

    Re: bulk convert strange file format in multiple folders.

    Our firewall blocks ALL file sharing services.
    Rapidshare is definately a file sharing service.

    I only ask about a sample file to ensure what I attempt is right.

  9. #9
    Forum Contributor
    Join Date
    06-13-2008
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    277

    Re: bulk convert strange file format in multiple folders.

    ah i see, no problem,

    here are 3 of them.

    the structure is seperate folders for each month in "yymm" format and each monthly folder contains one ew7 file in format "01ddmmyy" format.

    the macro should look at the original filename and just save a copy in the same location in xls format.

    thanks so much for your help
    Attached Files Attached Files

  10. #10
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163

    Re: bulk convert strange file format in multiple folders.

    Briefly explain the structure here.
    Please Login or Register  to view this content.
    Will "strPath" always be the path?
    Will "strFile" always be this value?
    What is the significance of the text "01" in strPath and "01" in strFile?
    The above creates a folder\file structure of:
    C:\EW_32b\CSV\01\0910\01281009.ew7
    Is this correct? (for this example).

    I am setting up a folder structure to mimic yours.

  11. #11
    Forum Contributor
    Join Date
    06-13-2008
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    277

    Re: bulk convert strange file format in multiple folders.

    Hi Rick, thats correct.

    The file path will always be the same (obviously folders will be created with each month - next month will be 0911.

    this is the same for the file name.

    there is no significance with the 01, however it does need to be accounted for as there will always be 01 at the begining of the file name.

    hope this helps.

    many thanks for your time

  12. #12
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163

    Re: bulk convert strange file format in multiple folders.

    Here is a workbook and macro to TEST. Please test this on samples first.
    I have the macro setup to run from a small list of folders on Sheet(3) from Drive "D:".
    I then placed three sample files in two of the five listed folders. Sample files included in ZIP file (Copies of your files) and are for folders 0909 and 0910. (It really wont matter since the macro searches for an "ew7" file in each folder).
    D:\EW_32b\CSV\01\0908
    D:\EW_32b\CSV\01\0909
    D:\EW_32b\CSV\01\0910
    D:\EW_32b\CSV\01\0911
    D:\EW_32b\CSV\01\0912
    When you are ready to convert the files simply change one character in the macro.
    Please Login or Register  to view this content.
    Change "3" to "1" and the macro will run from the list on Sheet(1).

    The macro will not delete any files!!!!
    The new files will be saved in the same folder as the "ew7" file.

    HTH
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    06-13-2008
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    277

    Re: bulk convert strange file format in multiple folders.

    Rick,

    Apologies for not getting back to you sooner, i have been out of the office.

    I have just looked at your macro and with absolutely no problems have run it and it converted all files in about 20 minutes! this is much MUCH better than the 20 months it would have taken me!

    Thank you so much for your time and your commitment to this! It always baffles me that you guys are willing to give so much.

    many many many many thanks!

  14. #14
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163

    Re: bulk convert strange file format in multiple folders.

    I get a lot form this forum, I believe in giving back.
    I am happy to have been of assistance.

    FYI
    10. Please acknowledge the response you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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