Jump to content

Using names of partitions in DOS scripts?


sgtmattbaker
 Share

Recommended Posts

I have DOS scripts to backup files whenever I decide to run them. However, some of the scripts backup information to a USB flash drive and the drive letter on the drive changes sometimes. I know I can have the script on the flash drive and accomplish my task, but is there any way to be able to use the mount name of a partition/drive in a DOS script, e.g. instead of L:\ use CRUZERMICRO? Thanks.

Link to comment
Share on other sites

USB Flash Drives will use the first available drive letter. For example, L. You can specify which drive letter you want it to use, for example Z and therefore it will never change.

Another option would be to use the ASSIGN command. Although I do not think it works in the emulated version of DOS that XP uses. It will only work with true DOS.

http://www.computerhope.com/assignhl.htm

Unfortunately what your asking for is quite complex whereas dos is based on simple commands and functions. My first suggestion would be your best option.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy