Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    joined file.... (2000 sr 1)

    I have a macro that import a txt file into a sheet.
    But before to import the txt file i must joined various txt file in one named TEST.TXT
    For example:
    prova1.txt
    prova2.txt
    prova3.txt
    ecc...

    In DOS i know the simple command:
    copy *txt TEST.TXT
    is possible via VBA for Excel make this bat and save the new file into same dir where is located the various file?

    Tks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: joined file.... (2000 sr 1)

    You can use the Shell instruction to issue a DOS command in VBA:

    <code>Shell "cmd /c copy C:MyDir*.txt C:MydirTest.txt"</code>

    where C:MyDir is the path.

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: joined file.... (2000 sr 1)

    <hr>copy MyDir*.txt MyDirTEST.TXT <hr>
    Does this copy all txt files in MyDir and append it into ONE txt file called text?
    Regards,
    Rudi

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: joined file.... (2000 sr 1)

    Yes, it does.

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: joined file.... (2000 sr 1)

    Clear, as usual...
    Tks, Sal

  6. #6
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: joined file.... (2000 sr 1)

    Hmm...Just learned my 1 000 000th new thing on Woody's. This could be very useful. Thanx Sal21 and Hans!
    Regards,
    Rudi

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: joined file.... (2000 sr 1)

    Can any of the original files contain blank lines? If so, it would be hard to determine which blank lines in the combined file result from joining the files together, and which ones occurred in the original files.

  8. #8
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: joined file.... (2000 sr 1)

    My dear when i joint the various txt file i have a blank line from each block of text.. Is possible after the joind eleiminate the blank line into final txt... Naturally via macro vba for excel?

    Note: i pray you dont forget my big prob... "during the scroll many value are cleared" is max important for me.
    Sorry naturally for big file but with the complete project is must eiser to understand the prob.

  9. #9
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: joined file.... (2000 sr 1)

    ok! if this is very hard no problem...

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: joined file.... (2000 sr 1)

    Re your note: please don't confuse the issue by introducing questions that belong in another thread. BTW, I'm not going to download multi-megabyte files any more.

  11. #11
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: joined file.... (2000 sr 1)

    but tell me at least as I can make for the file?
    In effect are 378 and 573 kbit....

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: joined file.... (2000 sr 1)

    You probably mean kilobyte, not kilobit <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>

    It should be possible to delete a lot of the rows in order to reduce the file size. Don't forget to Compact and Repair the database before zipping it.

  13. #13
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: joined file.... (2000 sr 1)

    kilobyte, Sorry <img src=/S/bash.gif border=0 alt=bash width=35 height=39> ...
    I have make all possible compression for all file...
    Compact and repair, ecc...
    oK! i have upload another a little file xls named http://www.gssitaly.com/l0785_def_minimum.zip (193 kilobyte;-))
    For mdb i have maked max compression http://www.gssitaly.com/prova.zip

    The problem "OF CLEAR SCROLL" in effect is only on L0785_CDI_50...

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: joined file.... (2000 sr 1)

    We do not need thousands of records, and neither do we need worksheets, userforms and modules that have nothing to do with the problem on hand. Keep on trying.

  15. #15
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: joined file.... (2000 sr 1)

    .. I have delete the table not in question in MDB PROVA....

Page 1 of 2 12 LastLast

Posting Permissions

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