Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default path strings

I am wondering if there is a function that returns /
converts the 'old' path format (i.e. maximum of 8
characters) from the new (long file name) format e.g.

c:\documents and settings\administrator\desktop\
=
c:\docume~1\admini~1\desktop

Thanks

Jack
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default path strings

Jack,

Not that I know of. Shouldn't be difficult though, it is just first 6 chars
& ~1. Check if that already exists if so make it ~2 etc.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Jack Clift" wrote in message
...
I am wondering if there is a function that returns /
converts the 'old' path format (i.e. maximum of 8
characters) from the new (long file name) format e.g.

c:\documents and settings\administrator\desktop\
=
c:\docume~1\admini~1\desktop

Thanks

Jack



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default path strings

On Sat, 31 Jan 2004 10:05:27 -0000, "Bob Phillips"
wrote:

Jack,

Not that I know of. Shouldn't be difficult though, it is just first 6 chars
& ~1. Check if that already exists if so make it ~2 etc.


Actually, there IS one way, if you have the Microsoft Scripting
Library installed, the FileSystemObject can do it for you (make sure
that you only use this with a saved workbook or it'll barf on the
ThisWorkbook.FullName line):

Sub ShowShortName()

Dim fso As Object

'The file to check
Dim fil As Object

Set fso = CreateObject("Scripting.FileSystemObject")

Set fil = fso.GetFile(ThisWorkbook.FullName)

MsgBox "Short path = " & fil.ShortPath _
& vbCrLf & "Short Name = " & fil.ShortName

Set fil = Nothing

Set fso = Nothing

End Sub

"Jack Clift" wrote in message
...
I am wondering if there is a function that returns /
converts the 'old' path format (i.e. maximum of 8
characters) from the new (long file name) format e.g.

c:\documents and settings\administrator\desktop\
=
c:\docume~1\admini~1\desktop

Thanks


---------------------------------------------------------
Hank Scorpio
scorpionet who hates spam is at iprimus.com.au (You know what to do.)
* Please keep all replies in this Newsgroup. Thanks! *
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
find and replace numeric strings in larger text strings Mr Molio Excel Worksheet Functions 8 November 9th 11 05:17 PM
Contatenate folder path strings, how ? Excel-Guy Excel Worksheet Functions 2 January 19th 10 12:05 PM
How to find number of pairs of strings from list of strings? greg_overholt Excel Worksheet Functions 5 January 27th 06 10:42 PM
hyperlink navigation path path wrong in Excel 2003 CE Admin Excel Discussion (Misc queries) 5 January 7th 06 07:47 PM
how to change absolute path to relative path hwijgerse Excel Worksheet Functions 0 November 25th 05 07:18 AM


All times are GMT +1. The time now is 05:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"