Skip to content

Instantly share code, notes, and snippets.

@davidruhmann
Created February 4, 2015 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidruhmann/ad75ca27d28279b68646 to your computer and use it in GitHub Desktop.
Save davidruhmann/ad75ca27d28279b68646 to your computer and use it in GitHub Desktop.

Source Drive

If using a batch script, you can obtain the drive letter by using the 0 argument.

echo %~d0

Though if using folder mounts, you will want to keep the folder name as well.

wmic volume where label='Knox' get name

Target Drive

For a target drive, if you know it has a letter, you can use the

wmic volume where label='Dugout' get name

Drive Letters

Once you run out of drive letters A-Z; to access the drives, you can map them to folders. https://technet.microsoft.com/en-us/library/cc753321.aspx

  1. Create an empty folder on a NTFS drive.
  2. Open Disk Management
  3. Set the path for the desired Partition.

enter image description here

Or from the command line, use diskpart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment