I/O

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin Robinson

    #1

    I/O

    Is there any way of opening a file for input altering its contents and then
    saving it with the same name
    but with a date attached eg myfile_23-03-2005 , myfile_24-03-2005 e.t.c.

    I have tried appending Date to the end of the filename when saving but that
    doesn't work.


    Thanks

    Kevin


  • David Hodgkins

    #2
    Re: I/O

    Probably the easiest way would be something like:


    Open strFile_1 for input as 1
    Open strFile_2 for output as 2

    Do until EOF(1)
    'manipulate contents here if needed
    'write contents to strFile_2
    loop
    Close

    Hope this helps.

    David Hodgkins, MCSD, MCDBA, MCSE
    JSTAR Software Solutions
    4402 Sweet Cherry Ln.
    Kalamazoo, MI 49004
    www.jstarsoftware.com - Home of AutoCompact for Access Databases
    269-382-2931


    "Kevin Robinson" <k.s.robinson@b tinternet.com> wrote in message
    news:d2ba7o$20i $1@sparta.btint ernet.com...[color=blue]
    > Is there any way of opening a file for input altering its contents and[/color]
    then[color=blue]
    > saving it with the same name
    > but with a date attached eg myfile_23-03-2005 , myfile_24-03-2005 e.t.c.
    >
    > I have tried appending Date to the end of the filename when saving but[/color]
    that[color=blue]
    > doesn't work.
    >
    >
    > Thanks
    >
    > Kevin
    >
    >[/color]


    Comment

    Working...