Consulting

Results 1 to 11 of 11

Thread: Help creating a file joining different other files

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Help creating a file joining different other files

    Dear friends,

    I'm in a situation where I'm really struggling to get it solved. I really don't know if what I'm asking is even possible to do with VBA code, but here it goes:

    I have one folder with hundreds of files in a format that is editable with a text editor. I want to join all of those files into one (to use on other application). But the thing is, to create this file there are some conditions that have to be met so that the created file can be read with by the other application.

    The files are sorted alphabetically. I have file a.sp2 , b.sp2 , c.sp2 , ....

    The code should start reading a.sp2 file and all this file content should be copied to the new-file, then it should read b.sp2 and it should only copy from line 83 to the end of b.sp2 file to the end of the previously created file. Then it should read c.sp2 file and copy from line 83 to the end of c.sp2 file to the new created file , and so on...

    So basically the code should copy all the content of the first file and then join the content (starting on line 83 to the end) from all the other files in that folder.

    I will attach a zip file with example files (a.sp2 , b.sp2 , c.sp2) and a desired output for the code (output.sp2).

    Thank you so much for any help given

    Best Regards
    Attached Files Attached Files

Posting Permissions

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