Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Dec 2009
    Posts
    14
    Thanks
    0
    Thanked 1 Time in 1 Post

    Question In DOS: where am I running from?

    This seems like it shouldn't be rocket science but....
    When executing a batch file, say from a flash drive, I'd like to capture the drive letter of that flash drive.

  2. #2
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,518
    Thanks
    36
    Thanked 206 Times in 185 Posts
    %~d0 will give you x: where x is the drive letter.
    cd will give you x:\
    Do you need any more info?
    BATcher

    milliHelen
    (unit): that quantity of female facial beauty sufficient to launch a single ship

  3. The Following User Says Thank You to BATcher For This Useful Post:

    SF99 (2012-04-26)

Tags for this Thread

Posting Permissions

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