Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Variables 外部存储/可移动磁盘的环境变量?_Variables_Batch File_Autohotkey_Environment_Removable Storage - Fatal编程技术网

Variables 外部存储/可移动磁盘的环境变量?

Variables 外部存储/可移动磁盘的环境变量?,variables,batch-file,autohotkey,environment,removable-storage,Variables,Batch File,Autohotkey,Environment,Removable Storage,我有一个Seagate Backup Plus驱动器和一个FreeAgent GoFlex驱动器。当我插入它们时,它们在E:和F:之间交替。我需要写一个脚本,可以在任何计算机上访问,或任何驱动器号 我使用的是Win7x64,我不认为LD_LIBRARY_PATH是这里的答案 有人知道如何链接到它吗?使用,例如,获取可移动驱动器的列表: ; put drive letters of removable drives into variable 'drives' DriveGet, drives,

我有一个Seagate Backup Plus驱动器和一个FreeAgent GoFlex驱动器。当我插入它们时,它们在E:和F:之间交替。我需要写一个脚本,可以在任何计算机上访问,或任何驱动器号

我使用的是Win7x64,我不认为LD_LIBRARY_PATH是这里的答案

有人知道如何链接到它吗?

使用,例如,获取可移动驱动器的列表:

; put drive letters of removable drives into variable 'drives'
DriveGet, drives, list, REMOVABLE
Loop, Parse, drives  ; loop through each character (drive letter) in drives
{
  DriveGet, labelName, label, %A_LoopField%:  ; get the drive label
  MsgBox Drive %A_LoopField%, Label=%labelName%
}
尝试对驱动器标签使用DriveGet: