Page 1 of 1
GetDrivePart()
Posted: Fri Jan 27, 2017 7:39 am
by IdeasVacuum
We have GetPathPart(), GetFilePart() and GetExtensionPart().
GetDrivePart() is missing

Re: GetDrivePart()
Posted: Fri Jan 27, 2017 8:09 am
by Keya
isnt "Drive:" just a Windows thing though? like would you return /mnt/something on Linux or? another thing to consider is other path formats on Windows like UNC "\\ComputerName\SharedFolder\Resource" or Long UNC "\\?\UNC\ComputerName\SharedFolder\Resource"
btw i wouldn't mind a GetProgramPath(), life's too short for GetPathPart(ProgramFilename()) hehe #mygrowinglistof1stworldproblems
Re: GetDrivePart()
Posted: Sun Mar 19, 2023 8:42 am
by Thunder93
Old topic, although even older feature request of the same at
viewtopic.php?t=30585 by PB Tue Jan 15, 2008. I agree, would be convenient feature to complement the existing filesystem library but I do understand Drive being part of the command name would be misleading under the other OSes. How abouts GetRootPart(), better?
IdeasVacuum wrote: Fri Jan 27, 2017 7:39 am
We have GetPathPart(), GetFilePart() and GetExtensionPart().
GetDrivePart() is missing
Re: GetDrivePart()
Posted: Wed Mar 22, 2023 4:56 pm
by Seymour Clufley
+1
Re: GetDrivePart()
Posted: Wed Mar 22, 2023 5:31 pm
by AZJIO
Code: Select all
EnableExplicit
Macro GetDrivePart(s)
Left(s, 3)
EndMacro
Define fuf.s = "C:\Windows\System32"
Debug GetDrivePart(fuf)
Re: GetDrivePart()
Posted: Wed Mar 22, 2023 6:17 pm
by jacdelad
AZJIO wrote: Wed Mar 22, 2023 5:31 pm
Code: Select all
EnableExplicit
Macro GetDrivePart(s)
Left(s, 3)
EndMacro
Define fuf.s = "C:\Windows\System32"
Debug GetDrivePart(fuf)
Not for Linux...