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. Visual Basic
  4. Making sure a file really is there

Making sure a file really is there

Scheduled Pinned Locked Moved Visual Basic
csharpdotnetquestion
9 Posts 5 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.
  • D Offline
    D Offline
    Drew
    wrote on last edited by
    #1

    Is there some part of the .NET framework that allows me to check to make sure a file is there? To be more specific, I need to make sure a shortcut is there. Any ideas?

    T 1 Reply Last reply
    0
    • D Drew

      Is there some part of the .NET framework that allows me to check to make sure a file is there? To be more specific, I need to make sure a shortcut is there. Any ideas?

      T Offline
      T Offline
      The ANZAC
      wrote on last edited by
      #2

      if system.io.file.exists(path as string) = true then 'it exists end if You can do the same with a directory.

      Please check out my articles: The ANZAC's articles

      D 1 Reply Last reply
      0
      • T The ANZAC

        if system.io.file.exists(path as string) = true then 'it exists end if You can do the same with a directory.

        Please check out my articles: The ANZAC's articles

        D Offline
        D Offline
        Drew
        wrote on last edited by
        #3

        Is there a way to navigate to the file you want to copy in code?

        D 1 Reply Last reply
        0
        • D Drew

          Is there a way to navigate to the file you want to copy in code?

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          OpenFileDialog?

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          D 1 Reply Last reply
          0
          • D Dave Kreskowiak

            OpenFileDialog?

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007

            D Offline
            D Offline
            Drew
            wrote on last edited by
            #5

            Automatically...

            D 1 Reply Last reply
            0
            • D Drew

              Automatically...

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              You'll have to explain what you mean by "automatically navigate to a file"??

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007

              D 1 Reply Last reply
              0
              • D Dave Kreskowiak

                You'll have to explain what you mean by "automatically navigate to a file"??

                A guide to posting questions on CodeProject[^]
                Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                     2006, 2007

                D Offline
                D Offline
                Drew
                wrote on last edited by
                #7

                In code, tell it to go to %USERPROFILE%\Desktop\. I am trying to put an icon on the desktop without using a special installer.

                C D 2 Replies Last reply
                0
                • D Drew

                  In code, tell it to go to %USERPROFILE%\Desktop\. I am trying to put an icon on the desktop without using a special installer.

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #8

                  Environment.SpecialDirectory, from memory, is how you get paths to things like the desktop.

                  Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

                  1 Reply Last reply
                  0
                  • D Drew

                    In code, tell it to go to %USERPROFILE%\Desktop\. I am trying to put an icon on the desktop without using a special installer.

                    D Offline
                    D Offline
                    dBrong
                    wrote on last edited by
                    #9

                    List of special folders: 0 Desktop 2 Programs 5 Personal 6 Favorites 8 Recent 9 SendTo 11 StartMenu 13 MyMusic 16 DesktopDirectory 17 MyComputer 26 ApplicationData 28 LocalApplicationData 32 InternetCache 33 Cookies 34 History 35 CommonApplicationData 37 System 38 ProgramFiles 39 MyPictures 43 CommonProgramFiles This will get you the user's desktop: Environment.GetFolderPath(Environment.SpecialFolder.DeskTop)

                    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