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. C#
  4. How to get the path of the file that is present with in the project folder.

How to get the path of the file that is present with in the project folder.

Scheduled Pinned Locked Moved C#
helptutorial
3 Posts 2 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.
  • S Offline
    S Offline
    sukanyavarma
    wrote on last edited by
    #1

    Hai all, In my program an animation control is placed on the windows form. And the Avi file will be played when the form is loaded. Here the file path of the Avi file is assigned to the file name property of the animation control. My problem is I want to make the program work when the program is deployed on different machines where the file path will be different. I am placing the Avi file the with in the project folder it self. Is ther any method to get the project folder path so that i can append the path to the file name. Please help me sukanyavarma

    C 1 Reply Last reply
    0
    • S sukanyavarma

      Hai all, In my program an animation control is placed on the windows form. And the Avi file will be played when the form is loaded. Here the file path of the Avi file is assigned to the file name property of the animation control. My problem is I want to make the program work when the program is deployed on different machines where the file path will be different. I am placing the Avi file the with in the project folder it self. Is ther any method to get the project folder path so that i can append the path to the file name. Please help me sukanyavarma

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

      Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "my.avi"); Christian Graus - Microsoft MVP - C++

      S 1 Reply Last reply
      0
      • C Christian Graus

        Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "my.avi"); Christian Graus - Microsoft MVP - C++

        S Offline
        S Offline
        sukanyavarma
        wrote on last edited by
        #3

        Thank You Christian Graus, It is working. Thanks for your help. I am a bignner in .net my learning curve is becoming lot more steeper because of the people like You and the code project. Thanks a lot to all you people for your generous responces. Sukanyavarma

        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