Results 1 to 5 of 5

Thread: Function for analysing a disk?

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2015
    Posts
    58

    Question Function for analysing a disk?

    Hi,

    I was building a useful app for myself and I was wondering if there is a function for analysing a disk before disk defragmentation?

    Thanks,

    lewis.

  2. #2
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,836

    Re: Function for analysing a disk?

    Google is your friend

    http://www.codeproject.com/Articles/22536/Disk-Analyzer

    This site also has a search tool but I didn't look up your request.
    Please remember next time...elections matter!

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2015
    Posts
    58

    Re: Function for analysing a disk?

    Quote Originally Posted by TysonLPrice View Post
    Google is your friend

    http://www.codeproject.com/Articles/22536/Disk-Analyzer

    This site also has a search tool but I didn't look up your request.
    That is in C#. I'm using .NET. Also, .SLN file doesn't create the files properly. I've also no experience in C# or that area

  4. #4
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: Function for analysing a disk?

    C# is the .NET language the other 90% of .NET developers use, it's very hard to get by if you don't know it.

    That's a /really/ old project. The page was published in 2008, so I bet the project targets VS 2008 or perhaps VS 2005.. That means it's not likely you'll have an easy time getting a modern Visual Studio to open it without some work. VS didn't get a degree of backwards compatibility until 2012 or so.

    That doesn't mean it's unsalvageable. That means cracking your knuckles, creating a new C# project, then adding the files to that project yourself, and trying to address the build errors that result from your mistakes. My guess is you're going to have to get rid of the pie chart control, as it likely won't work without some tricks or recompilation, and you don't really care about the pie chart, you care about disk analysis.

    That said, read the article. It has nothing to do with disk defragmentation, or analysis before disk defragmentation, so it'd be a pretty big waste of time to fool with it, unless making a pie chart of the space files are taking is what you want to do.

    It seems Google is a dangerous friend.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  5. #5

    Thread Starter
    Member
    Join Date
    Apr 2015
    Posts
    58

    Re: Function for analysing a disk?

    Never mind.

    Instead, is there a way to catch and print results of a Shell() command? I currently have this and was looking for a way to print the results from that instance:

    Code:
    Private Sub btnDefrag_Click(sender As Object, e As EventArgs) Handles btnDefrag.Click
            If lstDefrag.Items.Contains("D:\") Then
                Shell("defrag D: /a")
            End If
        End Sub
    Maybe I should have said I have only a small amount of experience in .NET. I'm a college student just interested in the different functions, so I have a very barebones knowledge

    Thanks again.

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