ShortenDir

Shorten a long Dir by adding ... in the middle to make it fit in small boxes
Found online a while back, needs some work maybe, but a good start.
Can be modified to be used with URLs as well


Public

Tested

Not My Work

FullDir, MaxLength

MyPath = "D:\My\Dropbox\CameraQosmioTV\Sites.Add2ANmarSystems\FeedBacks"
? ShortenDir(MyPath, 70)
D:\My\Dropbox\CameraQosmioTV\Sites.Add2ANmarSystems\FeedBacks
? ShortenDir(MyPath, 60)
D:\...\CameraQosmioTV\Sites.Add2ANmarSystems\FeedBacks
? ShortenDir(MyPath, 50)
D:\...\Sites.Add2ANmarSystems\FeedBacks
? ShortenDir(MyPath, 40)
D:\...\Sites.Add2ANmarSystems\FeedBacks
? ShortenDir(MyPath, 30)
D:\...\FeedBacks
? ShortenDir(MyPath, 20)
D:\...

Views 1112
Downloads 378

Classic ASP File System
ANmarAmdeen
929
Attachments
Revisions

v1.0

Wednesday
February
19
2020