We have GetPathPart(), GetFilePart() and GetExtensionPart().
GetDrivePart() is missing
GetDrivePart()
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
GetDrivePart()
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
-
- Addict
- Posts: 1233
- 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)
PureBasic 6.04/XProfan X4a/Embarcadero RAD Studio 11/Perl 5.2/Python 3.10
Windows 11/Ryzen 5800X/32GB RAM/Radeon 7770 OC/3TB SSD/11TB HDD
Synology DS1821+/36GB RAM/130TB
Synology DS920+/20GB RAM/54TB
Synology DS916+ii/8GB RAM/12TB
Windows 11/Ryzen 5800X/32GB RAM/Radeon 7770 OC/3TB SSD/11TB HDD
Synology DS1821+/36GB RAM/130TB
Synology DS920+/20GB RAM/54TB
Synology DS916+ii/8GB RAM/12TB