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

时间:2015-02-24 03:26:25

标签: variables batch-file autohotkey environment removable-drive

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

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

有谁知道如何链接到它?

1 个答案:

答案 0 :(得分:0)

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

; 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%
}