![]() |
| The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
|
Post Reply
|
| Author | |
bneylon
Senior Member
Joined: March 03 2004 Location: United States Status: Offline Points: 103 |
Post Options
Thanks(0)
Quote Reply
Topic: Retrieve File system infoPosted: October 01 2008 at 2:55am |
|
I need to to find the drive letter from the share name. This program will return the drive letter and share name of all your drives that are ready.
SUBROUTINE FILE.SYSTEM(PATH,STAT) * program : FILE.SYSTEM * programmer : Bruce Neylon * Date : 10/01/2008 * * Description: Return Available file system * ********************************************** * Modifications * ********************************************** * Variable setup* bmn 10/01/2008 EQU ESC TO CHAR(27), STX TO CHAR(2), CR TO CHAR(13), EM TO CHAR(25) SCR='Dim fs, d, dc, s, name' SCR=SCR:EM:'Set fs = CreateObject("Scripting.FileSystemObject")' SCR=SCR:EM:'Set dc = fs.Drives' SCR=SCR:EM:'For Each d In dc' SCR=SCR:EM:' If (d.IsReady) Then' SCR=SCR:EM:' s = s & d.DriveLetter & ":"' SCR=SCR:EM:' If d.DriveType = Remote Then' SCR=SCR:EM:' name = d.ShareName' SCR=SCR:EM:' Else' SCR=SCR:EM:' name = d.VolumeName' SCR=SCR:EM:' End If' SCR=SCR:EM:' s = s & name & Chr$(13)' SCR=SCR:EM:' end if' SCR=SCR:EM:'Next' SCR=SCR:EM:'InitSession.Output s & Chr$(13)' PRINT ESC:STX:'P':SCR:CR: ECHO OFF PATH = '' PROMPT "" LOOP INPUT TV: UNTIL TRIM(TV) = '' PATH<-1> = TV REPEAT PROMPT "?" ECHO ON RETURN |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |