Link to home
Start Free TrialLog in
Avatar of Allan_Fernandes
Allan_Fernandes

asked on

Long File Names using \\?\ is nuisance, any alternatives

Hi,

I am using Delphi Xe2 and I need to use \\?\ to access files with deep folders.
I have to check my code and where ever there is User Interface I need to show without  \\?\  and whereever internal processing I need to use with \\?\.

Is there any better option.

Regards
Allan
Avatar of Sinisa Vuk
Sinisa Vuk
Flag of Croatia image

Use ExpandUNCFileName to get full path with computer name:
http://delphi.about.com/library/rtl/blrtlExpandUNCFileName.htm

and ExpandFileName for internal use:

http://delphi.about.com/library/rtl/blrtlExpandFileName.htm
Avatar of Allan_Fernandes
Allan_Fernandes

ASKER

I meant where filename > 255 chrs
does anybody actually type in such a long file name ?
get serious !
there is a reason why it's limited to 255 chars:
  the human brain can't remember a path longer than that
how many times per day does anybody ask if they still know that path name ?

same problem here. in the end they had to admit they used shortcuts to the folder ...

if it's on a \\ path
create a shared folder on that server to the common deepest level it can go
then start from there

sample:
\\server\c$\a\b\c\d\e\f\g\h\i\j\k\l\m\o\p
> share named "ooo" on server to c:\a\b\c\d\e\f\g\h\i\j\k\l\m\o

this then changes to
\\server\ooo\p
Since windows allows such paths users create it. I have a backup application, if I cannot backup the data then User does not purchase my package. I loose the client without any chance of explaining to him how he can make use of Shared folders.

What I need to know is, if there is a common logic that I can use for standard files and the ones > 255.
ASKER CERTIFIED SOLUTION
Avatar of Sinisa Vuk
Sinisa Vuk
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
have you considered backing a system with a synchronous DR system  in place ?

the data ... most data resides in databases
the data files usually require a databases specific mechanism to do backups

windows ... so your software can restore a complete windows environment
without having access to the windows system itself ?

i hope you considered all those questions ... :)