GetDrivePart() is missing
GetDrivePart()
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
GetDrivePart()
We have GetPathPart(), GetFilePart() and GetExtensionPart().
GetDrivePart() is missing
GetDrivePart() is missing
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: GetDrivePart()
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
btw i wouldn't mind a GetProgramPath(), life's too short for GetPathPart(ProgramFilename()) hehe #mygrowinglistof1stworldproblems
Re: GetDrivePart()
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![]()
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
-
Seymour Clufley
- Addict

- Posts: 1266
- Joined: Wed Feb 28, 2007 9:13 am
- Location: London
Re: GetDrivePart()
+1
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
Re: GetDrivePart()
Code: Select all
EnableExplicit
Macro GetDrivePart(s)
Left(s, 3)
EndMacro
Define fuf.s = "C:\Windows\System32"
Debug GetDrivePart(fuf)
Re: GetDrivePart()
Not for Linux...AZJIO wrote: Wed Mar 22, 2023 5:31 pmCode: Select all
EnableExplicit Macro GetDrivePart(s) Left(s, 3) EndMacro Define fuf.s = "C:\Windows\System32" Debug GetDrivePart(fuf)
Good morning, that's a nice tnetennba!
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD