Results 1 to 4 of 4

Thread: File still being written to?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2004
    Posts
    15

    File still being written to?

    I needed to get a listing of files inside a folder and any subfolders in that of a certian type. Also the list needed to be sorted by date. I had code to do all this but I thought instead of just building all that and then building a sort I could just have the program create a dos batch job and run that (so everything I wanted is listed and sorted from only a few lines of code).

    Anyway the .bat writes everything out to a file and I need a way to find out if that file is still being written to. I searched the forum and found one thing on files still being written to but that code causes it to crash.

  2. #2
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622
    Please Post your code.... (you may have left a file handle open ect.)

    How do you need to sort your files? Accomplishing this task in VB.net may be preferable to doing it with batch files because you dont have to have the additional overhead of parsing the .txt file and some anit-virii programs dont like batch files...
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2004
    Posts
    15
    sorry i figured it out... thanks for trying though. The batch dir is the way I wanted to go. It lists everything I need already neatly formatted. I wouldn't know how to format that in vb.

  4. #4
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622
    its quite easy to format things in vb.net for example

    VB Code:
    1. Dim strValue as String = "<abx"
    2. Dim intAge as String = 2
    3.  
    4. Dim strFormat as Stirng = "{0} has been programming, for quite some time and likes to program is VB.Net for fun. He is {1} years old!"
    5.  
    6. Msgbox (String.Format(strFormat, strValue, intAge))

    but if it works, why reinvent the wheel...
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

Posting Permissions

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



Click Here to Expand Forum to Full Width