none
How to retrive folder name of a file? RRS feed

  • Question

  •  

    Hi,

    can any one tell me that how to get the folder name if i know the file name?

    i m working on windows mobile .

    Thursday, July 10, 2008 6:14 AM

Answers

  • You cannot know the file name only. What if you have the following structure:

    \Dir1

      \file.txt

    \Dir2

       \file.txt

     

    Knowing "file.txt" means nothing. It can be either one. For this reason the file name usually (on Windows Mobile - always) includes path, e.g. \Dir1\file.txt. As you can see the directory name is a part of the path

    Thursday, July 10, 2008 10:19 AM

All replies

  • You cannot know the file name only. What if you have the following structure:

    \Dir1

      \file.txt

    \Dir2

       \file.txt

     

    Knowing "file.txt" means nothing. It can be either one. For this reason the file name usually (on Windows Mobile - always) includes path, e.g. \Dir1\file.txt. As you can see the directory name is a part of the path

    Thursday, July 10, 2008 10:19 AM
  •  

    THanks
    Thursday, July 10, 2008 10:57 AM