Add a line to end of the file using VBscript

HI
I am working with a software that only accept Vb script commands.
I have a file that has 8 columns. I need to add a line at the end of the file using VB script
I need this line to add numbers of amount column and put 22 in 7th column and leave the rest empty.
example:
2.01E+13
77008900
9.88
6/3/2013
1/14/2014
1/17/2014
2.01E+13
77008900
66.07
6/5/2013
1/14/2014
1/17/2014
added line
66.07+9.88=75.95                                               
22
the files have different number of rows. please help

why in the word you think you are smart as the fact is that you don't know shit.
I explained to you that the software has the ability to edit the file using VBscript. Now if you cant do it dont say that it makes no sense. because others already help me to solve this.
do everyone a favor and don't answer my questions please, Well you never answered any, don't post any nonsense comments
I am sorry but I don't think any of us can understand what you are trying to ask.  What software?  VBScript is a scripting language that you use to write a script.  It cannot modify a file that is open by another process.
We posted the suggestion to look into using the FileSystemObject to append a line to a file.  The examples show you how to do this.
I suspect that the real problem is that, since you don't speak English natively, we are not understanding what you are trying to ask.  I know that, for me, what you are asking doesn't make sense. Another guess is that you have a program that is able
to use VB to do things.  Is that what you mean by "softwares".  Are you saying that another program is written in VBScript and you want to modify it?
You have to clarify these things.
¯\_(ツ)_/¯

Similar Messages

  • How can I Read lines of data from a file starting at the end of the file??

    Can anyone help me with how to read lines of data starting from the end of a file instead of the beginning?? I do not want to load the entire file into memory as the files are very rather large. Instead I want to start at the end of the file and read lines backward , until I find the particular data item i am searching for, then stop.
    Can this be done in Java ? I know it can be done in Perl.
    Thanks.

    Thanks for your suggestion about the RandomAccessFile, I did actually thought about that approach , but wasn't sure it would work.
    I do not want to read the file in a sequential forward manner because the files contain large number of lines of data that have already been processed and therefore there is no need to reprocess these lines of data.
    The Unprocessed lines are always at the the end of the file and these are the data lines I am interesting in getting at without having to read the entire file. Therefore, i figure that if I can read the data from the end of the file then this would be much more efficient.

  • How to skip blank line (EOF char) at the end of the file while creating ?

    Hi,
    In my program I have to create a file in Text mode using OPEN DATASET statement. This file is being sent to a third party system for their processing. I came to know while creating the file using OPEN DATASET, one LF character is inserted end of the file resulting a blank line end of the file. Thus if my internal table contains 5 reocrds, in the created text file I can see 6 lines where last is a blank. My question is how to remove this blank line which is causing issue in the thirdparty system.
    Here is the Code I have used.
       TRY.
    Write the file in Text Mode
            OPEN DATASET lv_outpf FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE
                                 WITH SMART LINEFEED
                                  MESSAGE lv_msg.
            IF lv_msg IS NOT INITIAL.
              WRITE / lv_msg.
              EXIT.
            ENDIF.
            LOOP AT itab_new INTO st.
              TRANSFER st TO lv_outpf.
            ENDLOOP.
            CLOSE DATASET   lv_outpf.
          CATCH cx_root.                                    "#EC No Handler
        ENDTRY.

    an effective way to do it:
    open your dataset in binary mode, transfer the records but between each record transfer the LF (or CRLF according to your need)
    after the last record you don't transfer the LF

  • Remove Line feed at the end of the file while using file adapter

    Hi All,
    I have a requirement. We are sending a file from SAP to FTP using file adapter. we are successful in sending the file to FTP but at the end of the file a extra blank line is created .
    Can anyone please suggest how to remove the extra line feed at the end of the file.
    Thanks and Regards,
    LRK.

    check this:
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm
    To define an additional string as a separator after the last column in a row, specify it here. The system skips this string when it processes the last column (otherwise the system would treat it as part of the last column).
    Also there are solved threads which deal with same problem....you can even check them out...
    regards,
    Abhishek.

  • IDoc to file - how to delete a blank record at the end of the file.

    Hi,
    My senario is IDoc to file.  I have successfully implemented this using FCC. But when i checked the flat file, it has a blank record at the end of the file( i think PI adds one blank line/record at the end of the file).  Please suggest me What i need to do, to delete the blank record .
    Thanks & regards
    Sreeni

    Kindly Check below.
    Check whether the problem is at mapping level of  adapter level.. to do this count no. of rows/IDOC before mapping and after mapping in IE and no. of rows in the output file.
    Thnx
    Subbu

  • How to add page count of PDF to the file name?

    I need help with an applescript that can look at a pdf, determine the page count in file and then add that value to the end of the file name in front of the .pdf
    ex.
    original name "map with pages4c.pdf"
    renamed "map with pages4c_48.pdf"
    Any help would be appreciated or suggestions on how this could be done.
    Thanks,
    John

    Hello
    That's quite simple.
    Just replace this chunk of code -
    tell application "Finder"
    set n to f's name
    set f's name to (n's text 1 thru -5) & "_" & p & ".pdf"
    end tell
    with -
    if 10 > p then set p to "0" & p
    tell application "Finder"
    set n to f's name
    set f's name to (n's text 1 thru -5) & "_" & p & ".pdf"
    end tell
    By the way, if there are 10000 files in directory tree, I'm afraid Finder is too slow to get files list. In order to avoid Apple Events timeout error, at least, replace this line -
    tell o to run
    with -
    with timeout of 3600 seconds
    tell o to run
    end timeout
    Or try the following script, which employs find(1) instead of Finder to get files list.
    All the best,
    Hiroto
    --SCRIPT3
    on run
    --main((choose folder with multiple selections allowed) as list)
    main((choose folder) as list)
    end run
    on open aa
    main(aa)
    end open
    on main(aa)
    (* list aa : list of folder aliases *)
    script o
    property ff : {}
    -- confirmation for safety
    set AppleScript's text item delimiters to {ASCII character 0}
    set aa to (aa as Unicode text)'s text items
    set AppleScript's text item delimiters to {""}
    set aa to (choose from list aa default items aa ¬
    with prompt ("You're renaming pdf files in following folder tree(s).") ¬
    with multiple selections allowed)
    if aa = false then error number -128
    -- process each folder
    set k to 0
    repeat with a in aa
    set a to a as alias
    -- get pdf files' POSIX path list (= ff)
    set ff to {}
    set sh to "find " & quoted form of POSIX path of a & " -type f -name \"*.pdf\" -print"
    try
    set t to (do shell script sh)
    on error
    set t to ""
    end try
    set px to count t's paragraphs
    set p0 to 1
    repeat -- in order to avoid stack overflow in getting large number of paragraphs at once
    set p1 to p0 + 3500
    if p1 ≥ px then set p1 to -1
    set ff to my ff & t's paragraphs p0 thru p1
    if p1 = -1 then exit repeat
    set p0 to p1 + 1
    end repeat
    if ff = {""} then set ff to {}
    -- process each pdf file
    repeat with f in my ff
    set f to f as POSIX file as alias
    tell application "Adobe Acrobat 7.0 Professional"
    --open f
    open f with invisible
    tell document 1
    set p to count pages
    close
    end tell
    end tell
    if 10 > p then set p to "0" & p
    tell application "Finder"
    set n to f's name
    set f's name to (n's text 1 thru -5) & "_" & p & ".pdf"
    end tell
    set k to k + 1
    end repeat
    end repeat
    -- decent notice
    tell application (path to frontmost application as string)
    display dialog ("Total of " & k & " pdf file(s) renamed successfully.") ¬
    with icon 1 giving up after 5
    end tell
    end script
    with timeout of 3600 seconds -- just in case
    tell o to run
    end timeout
    end main
    --END OF SCRIPT3
    Message was edited by: Hiroto (fixed typos)

  • How to change "_review" at the end of the file name in Acrobat XI Pro

    For our business workflow, we need to be able to change the "_review" at the end of the file name when creating shared-review PDFs. Older versions of Acrobat Pro allowed me to customize the ending of the file name before it was saved as a shared review PDF. For example, when we send the initial review PDF, we append "_Review"; when we send a mark-up PDF (to capture changes before the next revision), we append "_Mark-Up". However, the XI Pro version does not (it automatically appends "_review" and doesn't give an option to change it).
    Is there something I need to configure in my settings to allow file name changes for shared-review PDFs?

    So why did you said that in your first posting? My glass sphere is out for cleaning...
    Instead of type c use strings and add spaces until they have the appropriate length.
    loop at outtab assigning <pout>.
      while strlen( <pout>-val ) < 135.
        concatenate <pout>-val `` into <pout>-val.
      endwhile.
    endloop.

  • Cannot shrink log file 2 because the logical log file located at the end of the file is in use ?

    HI,
    I am getting this error frequently.. any recomendations :
    Executed as user: DB0\sqlservices. Processing database: dbin [SQLSTATE 01000] (Message 0) 
    Cannot shrink log file 2 (DB_log) because the logical log file located at the end of the file is in use. [SQLSTATE 01000] (Message 9008) 
    Processing database: DB_ [SQLSTATE 01000] (Message 0)  DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Message 2528) 
    Cannot shrink log file 2 (DB_log) because the logical log file located at the end of the file is in use. [SQLSTATE 01000] (Message 9008) 
    Processing database: DB [SQLSTATE 01000] (Message 0) 
    DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Message 2528) 
    Backup, file manipulation operations (such as ALTER DATABASE ADD FILE) and encryption changes on a database must be serialized. Reissue the statement after the current backup or file manipulation operation is completed. [SQLSTATE 42000] (Error 3023) 
    Processing database: DB_AC [SQLSTATE 01000] (Error 0)  
    [SQLSTATE 01000] (Error 0)  DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Error 2528). 
    The step failed.
    Please give any receomendations to avoid this error in future :
    Yangamuni Prasad M

     
    Hi Yangamuni,
    Are there any progress?
    Please have a look on the below threads with the similar issues as yours:
    http://www.sqlservercentral.com/Forums/Topic652579-146-1.aspx
    http://social.msdn.microsoft.com/forums/en-US/sqldatabaseengine/thread/ae4db890-c15e-44de-a2af-e85c04260331
    The solution is change the recovery mode to SIMPLE, shrink log files and then change to the FULL recovery mode.
    Thanks,
    Weilin Qiao
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.

  • How to find out the end of the file in java

    hi friends,
    I am reading a file char by char. So how can I check for end of the file. I va a integer of the character and a string which has hex value of the character.
    but when I execute the pgm, it shows out of memory error. overflow of the heap.
    can anyone help???
    thanks in advance...
    bye

    There is no "type of file". It's all zeroes andones.
    thing is am wrintin a file. I want to set the
    type(extension) to be .iso. how can i do that???If you want to make the extension ".iso" then just end the file name with ".iso".
    If you want to make the "type" iso, so that it can be manipulated by an iso application or whatever, then you have to make sure the bytes you write are of the proper format.
    As already stated: Files don't have a type.

  • Everytime I save a file from chrome it wants to save it with a (1) at the end of the file name. It i

    Everytime I save a file from chrome it wants to save it with a (1) at the end of the file name. It is extremely frustrating since I save hundreds of pdf files every month.
    It is the first time opening the file so it shouldn't be reverting to adding a (1) every time.
    I have chrome Version 28.0.1500.95 m

    Chrome does not use Adobe Reader to view or save PDF files. It does it all itself.
    Similarly FireFox, though it can be told to use Adobe Reader to view PDF files, doesn't do so by default. And Adobe Reader has nothing to do with saving.

  • Previously Firefox would show a number at the end of the file name (renaming the file by adding a number) showing that I had already downloaded a file at least once before. Recently that isn't happening. How do I get that feature back?

    When downloading, previously Firefox would show a number at the end of the file name (renaming the file by adding a number) showing that I had already downloaded a file at least once. Now that isn't happening. How do I get that feature back?

    When downloading, previously Firefox would show a number at the end of the file name (renaming the file by adding a number) showing that I had already downloaded a file at least once. Now that isn't happening. How do I get that feature back?

  • Can't tell when i have reached the end of the file

    Hi i'm trying to read a character at a time from a file but i can't tell the program when to stop when it has reached the end of the file
    THis is the code
    BufferedReader br = new BufferedReader(new FileReader("input_dat.txt"));
    while ((c =(char) br.read()) != .....what should go here...)
         System.out.print((char)c);

    i got it to work
    hear is the code if anyone is interested .
    int i= 0;
    char c;
    BufferedReader br = new BufferedReader(new FileReader("input_dat.txt"));
         while((i=br.read()) !=-1)
         c =(char) i;
         System.out.print((char)c);

  • Save as window size keeps going back to the default size. I need it to stay the size I set it at so I can read the end of the file name.

    .When I save a file in Photoshop, I save for web and devices. It gives you the first window which I always just hit enter. Then it gives you a second window to name the file and where to put it. The problem I’m having is that’s it’s not remembering I want the window bigger and I can’t see the whole name of the file. I need to see the end of the file name so I know what to save the next file as. I can scroll or make the window bigger again but that is too time consuming when I’m trying to do hundreds of them a day.
    I'm using Photoshop CS4 on a Mac running Yosemite.

    BOILERPLATE TEXT:
    Note that because this is boilerplate text, not all points may apply to any given, specific poster.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster).
    a screen shot of your settings or of the image could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • "Error occurred while launching. The end of the file was reached" ?

    I have OS 9.2.2 and, recently, OS X 10.3.9, installed on my machine. I have not yet transferred my Outlook Express files to MAIL. Yesterday, I was attempting to clean out my Outlook Express DELETE files when I noticed that I had hit the wrong key and was deleting my IN files. I couldn't stop the process,so I turned off my machine. Now, whenever I try to connect with Outlook Express, I get the message "Error occurred while launching. The end of the file was reached". Now, Outlook Express is no longer supported by Microsoft, so it's time to change to Safari, anyway, but I have many files in Outlook Express that I want to save. Can anything be done?

    David,
    No solutipn yet, but I'm still hopeful. However, I would appreciate your comments on the following:
    1. I still could not open Outlook Express, even after rebuilding the desktop--twice--and downloading it again. However, I just noticed that you recommended the use of a OS 9 CD, not a download. I'll look around for the CD if you feel that's the only way to go. Is it?
    2. When I downloaded the OS 9 Outlook Express, the window said to copy it to my Hard disk. I assume that means just to drag the Outlook Express icon to the top of the Hard Disk icon. Is that correct?
    3. If all else fails, what about those programs that have been around for years that facilitate the retrieval of otherwise lost files. Would such a program be helpful in this case? If so, can you mention a few of them? I want to retain some of those files, even if it means having to spend a hundred dollars or so for the necessary software.
    4. Yes, such mishaps can indeed be painful. Fortunately, although I am a bit of a fumble-fingers, the problems I have encountered since I bought my set in 1999 as the result of such clumsiness have been few. It looks like I've been lucky, but that I am paying for it now.
    iMac DV (Special Edition)   Mac OS 9.1.x  

  • "The end of the file was reached."

    this file i have says "The end of the file was reached."
    i can open it in VLC player but have been unsuccessful in re-exporting it in any other format, or importing it into any program for that matter
    if anyone knows how to correctly do it from vlc let me know, or ANY way i can make this file import into final cut
    thank you

    Hello,
    This error message appears when there's an inconsistency in the movie structure.
    VLC can play it because it's less picky with standards.
    If you want to recover the file and use it in Final Cut Pro, two solutions:
    1. Play with VLC Exporting Wizard until you manage to export to a good mov file (good luck with that.. you've been warned!)
    or
    2. Contact me and I'll take at look at it by email: repair "at" aeroquartet.com
    http://aeroquartet.com/movierepair/
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.
    Regards, BJ

Maybe you are looking for

  • Office 2013 Click-to-Run Event Logs

    Anyone know what the event logs are (Source, Event ID, etc) for Office 2013 Click-to-Run version? Specifically, I'm trying to find out when my installation was last updated (automatic updates are enabled). In general it would also be nice to know wha

  • Use of parameter sets with prepared INSERTS via Oracle's ODBC driver 8.1.6.4

    Oracles ODBC driver, version 8.1.6.4, allows for driver configuration of three different batch auto commit modes. If I select COMMIT ALL SUCCESSFUL STATEMENTS and cause my app to execute a prepared and parameterized INSERT statement that makes use of

  • KSB1: wrong output when data is tranfer to excel file

    Hello All, Kindly help me with my problem regarding extracting reprot in KSB1. Example: Doc no.     Cost Ctr.       Val/CoArea Cur      CoCur  Val/ObjCur     ObjCur 00001       1                     10.11                      USD      20             

  • Safari linking to ***********

    Hello, I am a very upset Apple customer who has been having this issue for quite a few months now. When I use Safari on numerous occasions when signing into websites I end up being linked to numerous *********** websites and one in particular which I

  • Changed password - can't connect

    Hi, Someone has been using my internet and cauing me to go over my usage!! So I logged into http://bthomehub.home and entered my password, went to settings and chose to change the password for my wifi. I choose WAP-2 and entered my password. I was th