Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Phreeneazie

    Adding the filename to the file.

    <Slapped Wrist accepted>. Ok. Thanks.
  2. Phreeneazie

    Adding the filename to the file.

    Hi PH, I have nothing so far! When I say I don't have much knowledge, that's perhaps an understatement :( I wouldn't know where to start.
  3. Phreeneazie

    Adding the filename to the file.

    Hi, as some of you will already know, I don't have much knowledge with VBScript.... I am in need of a script that will take a file, open it and on the top line of that file, add the name of the file to it. For instance... The name of the file is "DTF0001.txt" and the file might contain...
  4. Phreeneazie

    Need to delete a line...But how?!

    Guys, thank-you VERY much! I'm not in the office at the moment, but I'll have a go when I get in tonight and will report back the results. Once again you've saved my life! I keep on & on asking my boss to send me on some courses to learn VB but the answer? Always the same, "We'll look at...
  5. Phreeneazie

    Need to delete a line...But how?!

    HI all, I'm back pleading with you guys for some more help! Regular visitors will know I'm completely dumb s'far as VB goes :( I need to be able to delete a line of text in a file that contains the word "projected". It can appear anywhere on the line. I have been looking at this script...
  6. Phreeneazie

    Deleting lines.

    PHV, thank-you! That is doing *exactly* what I want it to do :-) One question - how can I make it work so that it opens every file in a specified directory? I usually have 9 files that I need to do and would like to be able to get the script to open each one in turn (and order) rather than...
  7. Phreeneazie

    Deleting lines.

    Hi, some of you may have seen my name pop up occasionally. For those that have, &quot;Hi&quot;! For those that haven't, &quot;Hi, you'll soon realise I don't know the slightest thing about VB :-(&quot;. I have a requirement at work to &quot;edit&quot; a text file and delete some lines of...
  8. Phreeneazie

    Julian Date.

    Thanks a lot guys! I'll give it a try.
  9. Phreeneazie

    Julian Date.

    I have a need to work out &quot;yesterdays&quot; Julian date and then write that out to a file. Does anyone know how this could be achieved? At first I was thinking of just having a file that had the number incremented by 1 every day. Of course this wouldn't work due the need to reset it on...
  10. Phreeneazie

    vbs to line count a text file

    In the meanwhile, I spoke to a friend who suggested: if acontents(ubound(acontents)) = &quot;&quot; then redim preserve acontents(ubound(acontents) - 1) end if and that seems to work ok - only that's working on any empty lines within the data I think? Will try your solution ;-)
  11. Phreeneazie

    vbs to line count a text file

    Thanks once again for the quick reply! It still appears to be doing the same thing...Here's the script in full: const sPath = &quot;c:\testarena&quot; 'some path you specify const ForReading = 1, ForWriting = 2, ForAppending = 8 set fso=createobject(&quot;scripting.filesystemobject&quot;) on...
  12. Phreeneazie

    vbs to line count a text file

    Eek! One more thing...It's working great except for one thing - it's adding one number too many - for instance, if I have a 5 line file, it's putting a 6 at the top of the file. If it's a 1 line file, it's putting a 2 and so on.. I don't know if it's reading an extra CRLF or something in the...
  13. Phreeneazie

    vbs to line count a text file

    Yep, works brilliantly! Thank-you very much for the help - I'll implement it today and it should all be plain-sailing from now! Thanks again :)
  14. Phreeneazie

    vbs to line count a text file

    Will try now and post back! Thanks for the quick response...
  15. Phreeneazie

    vbs to line count a text file

    Thanks again for that, really making progress! I just tried running that script and I received (my first!) error message: Script: c:\linecount.vbs Line: 13 Char: 1 Error: Object required: 'sfolder' Code: 800A01A8 Source: Microsoft VBScript runtime error ? Sorry for all the questions...
  16. Phreeneazie

    vbs to line count a text file

    Hi again! Just realised that the above code always opens the same file - &quot;abc_def.txt&quot;..How do I make it so that it will open any file it sees in a particular directory? I will have somewhere in the region of 100-200 files that I will need to run this script against and will have no...
  17. Phreeneazie

    vbs to line count a text file

    tsuji, that works fantastically well! (Not that I ever doubted you!). That is extremely helpful and I'll be using it a lot! Many thanks... I am <so> glad I've found you guys!
  18. Phreeneazie

    vbs to line count a text file

    Hi, I've just found this page as it's exactly what I need...Well, almost! Is there a way of modifying the code to read in several files and also, create several output files? I have a directory that will contain several files, but the filenames are uniquely created and I have no way of...
  19. Phreeneazie

    Show a record number?

    Thanks Neil! Just had a look and the Order By says, &quot;Members.Address&quot; - is that ok? Thanks for still looking for me!
  20. Phreeneazie

    Show a record number?

    Yep, have checked as you said and right at the very top, I have: Option Compare Database Option Explicit Dim Records As DAO.Recordset Dim Totalrecords and then the line. Where would I find the &quot;Order By&quot; option? I go to design view, right click on my form, select Properties and...

Part and Inventory Search

Back
Top