User Profile

Collapse

Profile Sidebar

Collapse
spazzo6281
spazzo6281
Last Activity: May 8 '08, 01:26 AM
Joined: Feb 26 '08
Location: Minnesota
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • spazzo6281
    started a topic changing drive letter automatically

    changing drive letter automatically

    Hello again, in my program i have it to search a certain path for files example:

    Code:
    f:\archive\files
    is there a way that if the program gets installed on a different drive that the "f" will automatically be changed to the new drive letter. example:

    the code is written like this
    Code:
    f:\archive\files
    if i want to install the program on the "c" drive instead the line of code will...
    See more | Go to post

  • I have gotten the code figured out. This is what it wound up being:

    Code:
    Dim text1 As String = txtOldP.Text
                Dim text2 As String = txtNewP1.Text
                Dim pword As String = My.Computer.FileSystem.ReadAllText("I:\MSCTC Moorhead Archive\word.txt", System.Text.ASCIIEncoding.ASCII)
                My.Computer.FileSystem.WriteAllText("I:\MSCTC Moorhead Archive\word.txt", pword.Replace(txtOldP.Text,
    ...
    See more | Go to post

    Leave a comment:


  • Thanks for you help but for some reason I just can't figure it out. This is the code i have so far:

    Code:
    my.computer.filesystem.readalltext("I:\msctc moorhead archive\word.txt")
    This is reading the text document that contains the word "test"

    How would I go about changing that word using textboxes in VB.net.
    See more | Go to post

    Leave a comment:


  • The code that i'm using to read the word is
    Code:
    My.Computer.FileSystem.ReadAllText(file path)
    . I have nothing written yet for changing the word. I really don't know how to go about doing that part....
    See more | Go to post

    Leave a comment:


  • spazzo6281
    started a topic Changing a word in a .txt document with VB.net
    in .NET

    Changing a word in a .txt document with VB.net

    Hello, does anybody out there know how to change a single word in a text document. Right now I'm using VB.net to read a word in a text document (it's the only word in there), I would like to be able to change that word using visual basic. Any help will be greatly appreciated.
    See more | Go to post

  • The program is finally doing what i wanted it to do. The concat method really helped. Thanks to everyone that helped me with my problems....
    See more | Go to post

    Leave a comment:


  • The path to not show up. sorry for the miss type....
    See more | Go to post

    Leave a comment:


  • I've looked and tried everything i could think of and it still doesn't work. I can use the trimstart feature but then the "process.start( lstbox.text)" doesn't work. I'm currently using "lstbox.items.a ddrange(IO.dire ctory.getfiles( "t:\photos" ))" to get the list of files but i still can't get path to know show up and have process.start still work. Thanks for trying....
    See more | Go to post

    Leave a comment:


  • Thanks to everyone that helped with this problem. Now that it's working all the found files come back like "t:\photos\*.jp g" does anybody out there know of a way to remove "t:\photos\ " and still have the "process.start( lstbox.text)" function work. I've tried everything that i could think of, and I guess I don't even know if it's possible. If anyone has any ideas I would appreciate it. Thanks.
    See more | Go to post

    Leave a comment:


  • Thanks, that worked....
    See more | Go to post

    Leave a comment:


  • I was finally able to get most of the code figured out with the following:

    Dim find As String = txtSearch.Text

    For Each foundfile As String In My.Computer.Fil eSystem.GetFile s("t:\documents ", FileIO.SearchOp tion.SearchAllS ubDirectories, find + "*.pdf", find + "*.doc")
    lstBox.Items.Ad d(foundfile)
    Next

    it works to find files that start with a given letter...
    See more | Go to post

    Leave a comment:


  • That didn't work, I'm just going to have to keep looking. Thanks for the help though.
    See more | Go to post

    Leave a comment:


  • spazzo6281
    started a topic Searching a folder for certain files

    Searching a folder for certain files

    Hello, is there a way to search a folder for certain files containing a wildcard or certain text entered into a text box. Right now all i can get is the whole list of files from a folder using the following code:

    lstbox.additems .addrange(IO.di rectory.getfile s("c:\"))

    How can i just return only files with matching text as whats in the text Box. Any help will be greatly appreciated. Thanks.

    Ma...
    See more | Go to post
No activity results to display
Show More
Working...