Drive letter

This is a discussion on Drive letter within the C Programming forums, part of the General Programming Boards category; Any efficient way to find the drive letter of the main hard drive with operating system? This program is platform ...

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    12

    Unhappy Drive letter

    Any efficient way to find the drive letter of the main hard drive with operating system? This program is platform dependent Windows OS.

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    305
    #include <stdio.h>
    int getdrive(void);

    it returns an integer: 1 for A, 2 for B, 3 for C, 4 for D ... it only works in windows/dos. drives dont exist in UNIX ....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. help using strings and mapping
    By trprince in forum C Programming
    Replies: 29
    Last Post: 12-01-2007, 03:01 PM
  2. Drive letter
    By opafire in forum C++ Programming
    Replies: 8
    Last Post: 04-22-2004, 08:02 PM
  3. drive letter
    By RoD in forum Tech Board
    Replies: 5
    Last Post: 03-27-2004, 06:45 PM
  4. Choosing drive letter
    By *ClownPimp* in forum Tech Board
    Replies: 4
    Last Post: 07-11-2003, 02:40 PM
  5. probe for drive letter assignment
    By iain in forum C Programming
    Replies: 3
    Last Post: 02-07-2002, 07:49 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21