Presence of a folder in a Drive
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Presence of a folder in a Drive

Hybrid View

  1. #1
    Join Date
    Apr 2008
    Posts
    159

    Presence of a folder in a Drive

    Hi,

    using C++ how can i check the presence of a folder in a drive.
    The path of the folder is available in a std::string like std::string path = "C:\\TestFolder";

    Please help.

    Thanks
    Dave

  2. #2
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,632

    Re: Presence of a folder in a Drive

    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    http://www.microsoft.com/visualstudio/eng/downloads

  3. #3
    Join Date
    Jul 2005
    Location
    Netherlands
    Posts
    2,012

    Re: Presence of a folder in a Drive

    Quote Originally Posted by Dave1024 View Post
    using C++ how can i check the presence of a folder in a drive.
    The path of the folder is available in a std::string like std::string path = "C:\\TestFolder";
    If you are looking for a cross-platform way to do this, have a look at the Boost Filesystem library.
    Cheers, D Drmmr

    Please put [code][/code] tags around your code to preserve indentation and make it more readable.

    As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky

  4. #4
    Join Date
    Apr 2008
    Posts
    159

    Re: Presence of a folder in a Drive

    could you say which mechanisam is more faster and reason behind these mechanisam for copy a folder from one location to other?
    1. I am using 'xcopy' dos command
    2. I am using file read and write method in <stdio.h>
    Will cycle stealing DMA had any role in my first choice ?

    Thanks
    Dave
    Last edited by Dave1024; December 15th, 2012 at 10:27 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center