Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. .NET 3.5 Visual Studio 2008 Find and Replace Files

.NET 3.5 Visual Studio 2008 Find and Replace Files

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpquestionvisual-studio
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Robert Kerber
    wrote on last edited by
    #1

    I am trying to make a program that can search a directory on the local computer for a certain file and then replace all of the occurrences of that file in the directory and the subdirectories. How can I do this?

    D 1 Reply Last reply
    0
    • R Robert Kerber

      I am trying to make a program that can search a directory on the local computer for a certain file and then replace all of the occurrences of that file in the directory and the subdirectories. How can I do this?

      D Offline
      D Offline
      dybs
      wrote on last edited by
      #2

      Look at the MSDN documentation on the DirectoryInfo[^] class. There's a link to the class's member functions and properties at the bottom. There's also a File class in System.IO you might want. Dybs

      R 1 Reply Last reply
      0
      • D dybs

        Look at the MSDN documentation on the DirectoryInfo[^] class. There's a link to the class's member functions and properties at the bottom. There's also a File class in System.IO you might want. Dybs

        R Offline
        R Offline
        Robert Kerber
        wrote on last edited by
        #3

        Thanks, I got that working. Now I have another question, Can you reference files in the projects references? Like type in a path and it opens a file in the resources.

        D A 2 Replies Last reply
        0
        • R Robert Kerber

          Thanks, I got that working. Now I have another question, Can you reference files in the projects references? Like type in a path and it opens a file in the resources.

          D Offline
          D Offline
          dybs
          wrote on last edited by
          #4

          To my knowledge, the "Project References" section is only for other assemblies referenced by your project (i.e. another class library). I'm not too familiar with how to use other resources in a project at the moment. Dybs

          1 Reply Last reply
          0
          • R Robert Kerber

            Thanks, I got that working. Now I have another question, Can you reference files in the projects references? Like type in a path and it opens a file in the resources.

            A Offline
            A Offline
            Ashwini K Singh
            wrote on last edited by
            #5

            in first go i would say no if you put more details of your requirement then we may think an alternative

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups