How to get to the d drive?

This is a discussion on How to get to the d drive? within the C++ Programming forums, part of the General Programming Boards category; Hello dudes, I have a small problem here. Suppose i have an test.exe file and i execute it on the ...

  1. #1
    Coussie
    Guest

    How to get to the d drive?

    Hello dudes,

    I have a small problem here. Suppose i have an test.exe file and i execute it on the c drive then i want to arrive on the d drive.
    So basically what the code has to do is just sth like "d:" in dos, can smb tell me how to do that?

    Thanks

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Well here's a real clear question - errm, not! First, lets just check, what operating system are you using? Since you start with C: I'll assume you are using an MS operating system, but I can't say more...

    So you have an .exe on C: and you want to...

    >>> arrive on the d drive

    ... what exactly do you mean? You want to put a file there? - CopyFile(), you want to set your working directory there - SetCurrentDirectory(), you want to run an .exe from there? - CreateProcess(), etc... etc...
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Unregistered
    Guest
    I just want to arrive on the d-drive.. so have the same effect as just typing d: in dos.
    Yup i'm on ms os..

  4. #4
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    which particular ms os??

    you cant "arrive" on the d: drive. Be more specific about the help you need exactly if you want an answer to your question.Do you just need to save a file on the d: drive? do you need to load a file from the d: drive? do you want a directory on the d: drive to be your current working directory? These are all different scenarios any of which could be applicable to your question. So please stop being a dolt and give us something to go on or you will just be ignored.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using IRP_MJ_CREATE (handle/createFile/access rom drive)
    By Witchfinder in forum C Programming
    Replies: 1
    Last Post: 03-11-2009, 04:07 AM
  2. Detect SCSI Hard Drive Serial Number
    By mercury529 in forum Windows Programming
    Replies: 3
    Last Post: 10-17-2006, 07:23 PM
  3. Replies: 2
    Last Post: 07-06-2005, 08:11 PM
  4. Spin A Drive and such
    By Seph_31 in forum C Programming
    Replies: 15
    Last Post: 11-20-2003, 06:04 PM
  5. XP Shared Drive Problem(?)
    By Davros in forum Tech Board
    Replies: 2
    Last Post: 10-06-2002, 02:37 PM

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