File System Object

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Vicky S

    #1

    File System Object


    Hello,
    I'm new to dot net and I can't seem to find the object name that is
    equivalent to Scripting.FileS ystemObject. Can anyone help?

    Thanks,
    V


  • Vicky S

    #2
    Re: File System Object


    and also.. for the functions right(string, len_returned) and left(string,
    len_returned)

    "Vicky S" <rainstorms@com cast.net> wrote in message
    news:%233MWUKiS DHA.1556@TK2MSF TNGP10.phx.gbl. ..[color=blue]
    >
    > Hello,
    > I'm new to dot net and I can't seem to find the object name that is
    > equivalent to Scripting.FileS ystemObject. Can anyone help?
    >
    > Thanks,
    > V
    >
    >[/color]


    Comment

    • Vicky S

      #3
      Re: File System Object


      and also.. for the functions right(string, len_returned) and left(string,
      len_returned)

      "Vicky S" <rainstorms@com cast.net> wrote in message
      news:%233MWUKiS DHA.1556@TK2MSF TNGP10.phx.gbl. ..[color=blue]
      >
      > Hello,
      > I'm new to dot net and I can't seem to find the object name that is
      > equivalent to Scripting.FileS ystemObject. Can anyone help?
      >
      > Thanks,
      > V
      >
      >[/color]


      Comment

      • Juliano Bortolozzi

        #4
        Re: File System Object

        Take a look at System.IO

        "Vicky S" <rainstorms@com cast.net> wrote in message
        news:#3MWUKiSDH A.1556@TK2MSFTN GP10.phx.gbl...[color=blue]
        >
        > Hello,
        > I'm new to dot net and I can't seem to find the object name that is
        > equivalent to Scripting.FileS ystemObject. Can anyone help?
        >
        > Thanks,
        > V
        >
        >[/color]


        Comment

        • Juliano Bortolozzi

          #5
          Re: File System Object

          Take a look at System.IO

          "Vicky S" <rainstorms@com cast.net> wrote in message
          news:#3MWUKiSDH A.1556@TK2MSFTN GP10.phx.gbl...[color=blue]
          >
          > Hello,
          > I'm new to dot net and I can't seem to find the object name that is
          > equivalent to Scripting.FileS ystemObject. Can anyone help?
          >
          > Thanks,
          > V
          >
          >[/color]


          Comment

          • Vicky S

            #6
            Re: File System Object


            Thanks,
            I can now generate a file.. but for some reason, it's not writing to it..
            what am I doing wrong?

            Dim oFile As System.IO.File, oStream As System.IO.Strea mWriter

            Dim filename As String

            filename = Application.Exe cutablePath & "\..\importlog. txt"

            oStream = oFile.CreateTex t(filename)

            oStream.WriteLi ne(Now() & " " & strMessage)



            "Juliano Bortolozzi" <julianobortolo zzi@hotmail.com > wrote in message
            news:uxOsQ4iSDH A.2276@TK2MSFTN GP10.phx.gbl...[color=blue]
            > Take a look at System.IO
            >
            > "Vicky S" <rainstorms@com cast.net> wrote in message
            > news:#3MWUKiSDH A.1556@TK2MSFTN GP10.phx.gbl...[color=green]
            > >
            > > Hello,
            > > I'm new to dot net and I can't seem to find the object name that is
            > > equivalent to Scripting.FileS ystemObject. Can anyone help?
            > >
            > > Thanks,
            > > V
            > >
            > >[/color]
            >
            >[/color]


            Comment

            • Vicky S

              #7
              Re: File System Object


              Thanks,
              I can now generate a file.. but for some reason, it's not writing to it..
              what am I doing wrong?

              Dim oFile As System.IO.File, oStream As System.IO.Strea mWriter

              Dim filename As String

              filename = Application.Exe cutablePath & "\..\importlog. txt"

              oStream = oFile.CreateTex t(filename)

              oStream.WriteLi ne(Now() & " " & strMessage)



              "Juliano Bortolozzi" <julianobortolo zzi@hotmail.com > wrote in message
              news:uxOsQ4iSDH A.2276@TK2MSFTN GP10.phx.gbl...[color=blue]
              > Take a look at System.IO
              >
              > "Vicky S" <rainstorms@com cast.net> wrote in message
              > news:#3MWUKiSDH A.1556@TK2MSFTN GP10.phx.gbl...[color=green]
              > >
              > > Hello,
              > > I'm new to dot net and I can't seem to find the object name that is
              > > equivalent to Scripting.FileS ystemObject. Can anyone help?
              > >
              > > Thanks,
              > > V
              > >
              > >[/color]
              >
              >[/color]


              Comment

              • Juliano Bortolozzi

                #8
                Re: File System Object

                In your example you just have to call the Close method of the stream object.

                But, to do what you want, I'd consider a different approach:

                Dim stream As System.IO.Strea mWriter

                Try

                stream = New System.IO.Strea mWriter("c:\tem p\test.txt", True)

                stream.Write("t est")

                Finally

                If Not stream Is Nothing Then

                stream.Close()

                End If

                End Try


                Note that you can't forget to close the stream, even if an exception has
                occured.

                "Vicky S" <rainstorms@com cast.net> wrote in message
                news:#TCbPWjSDH A.1572@TK2MSFTN GP12.phx.gbl...[color=blue]
                >
                > Thanks,
                > I can now generate a file.. but for some reason, it's not writing to it..
                > what am I doing wrong?
                >
                > Dim oFile As System.IO.File, oStream As System.IO.Strea mWriter
                >
                > Dim filename As String
                >
                > filename = Application.Exe cutablePath & "\..\importlog. txt"
                >
                > oStream = oFile.CreateTex t(filename)
                >
                > oStream.WriteLi ne(Now() & " " & strMessage)
                >
                >
                >
                > "Juliano Bortolozzi" <julianobortolo zzi@hotmail.com > wrote in message
                > news:uxOsQ4iSDH A.2276@TK2MSFTN GP10.phx.gbl...[color=green]
                > > Take a look at System.IO
                > >
                > > "Vicky S" <rainstorms@com cast.net> wrote in message
                > > news:#3MWUKiSDH A.1556@TK2MSFTN GP10.phx.gbl...[color=darkred]
                > > >
                > > > Hello,
                > > > I'm new to dot net and I can't seem to find the object name that is
                > > > equivalent to Scripting.FileS ystemObject. Can anyone help?
                > > >
                > > > Thanks,
                > > > V
                > > >
                > > >[/color]
                > >
                > >[/color]
                >
                >[/color]


                Comment

                • Juliano Bortolozzi

                  #9
                  Re: File System Object

                  In your example you just have to call the Close method of the stream object.

                  But, to do what you want, I'd consider a different approach:

                  Dim stream As System.IO.Strea mWriter

                  Try

                  stream = New System.IO.Strea mWriter("c:\tem p\test.txt", True)

                  stream.Write("t est")

                  Finally

                  If Not stream Is Nothing Then

                  stream.Close()

                  End If

                  End Try


                  Note that you can't forget to close the stream, even if an exception has
                  occured.

                  "Vicky S" <rainstorms@com cast.net> wrote in message
                  news:#TCbPWjSDH A.1572@TK2MSFTN GP12.phx.gbl...[color=blue]
                  >
                  > Thanks,
                  > I can now generate a file.. but for some reason, it's not writing to it..
                  > what am I doing wrong?
                  >
                  > Dim oFile As System.IO.File, oStream As System.IO.Strea mWriter
                  >
                  > Dim filename As String
                  >
                  > filename = Application.Exe cutablePath & "\..\importlog. txt"
                  >
                  > oStream = oFile.CreateTex t(filename)
                  >
                  > oStream.WriteLi ne(Now() & " " & strMessage)
                  >
                  >
                  >
                  > "Juliano Bortolozzi" <julianobortolo zzi@hotmail.com > wrote in message
                  > news:uxOsQ4iSDH A.2276@TK2MSFTN GP10.phx.gbl...[color=green]
                  > > Take a look at System.IO
                  > >
                  > > "Vicky S" <rainstorms@com cast.net> wrote in message
                  > > news:#3MWUKiSDH A.1556@TK2MSFTN GP10.phx.gbl...[color=darkred]
                  > > >
                  > > > Hello,
                  > > > I'm new to dot net and I can't seem to find the object name that is
                  > > > equivalent to Scripting.FileS ystemObject. Can anyone help?
                  > > >
                  > > > Thanks,
                  > > > V
                  > > >
                  > > >[/color]
                  > >
                  > >[/color]
                  >
                  >[/color]


                  Comment

                  Working...