Autor Beitrag
Harry M.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754

Win 2000, XP
D2005
BeitragVerfasst: So 13.02.05 13:39 
wie kann ich aus kurzen dateinamen wieder lange machen? habe zwar schon im forum gesucht und die eine funtion die ich gefunden habe ist nocht nicht ganz das was ich suchte. ich bin aber leider auch zublöd um sie meinen bedürfnissen anzupassen :bawling:
Radioactive
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179

Win 98, Win XP Home SP2
D3 Prof, D7 Pers, D2005 Pers
BeitragVerfasst: So 13.02.05 13:40 
Ist ein kurzer Dateiname ein DOS-Dateiname?
Es gibt in der MSDN eine Funktion, die das kann. Such da mal.

_________________
Radioactive
"Wer scrollt, verliert!" Matthias Stein, Informatiklehrer am GG
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: So 13.02.05 13:44 
Diue Schweizer ham da was ;)

www.swissdelphicente...e/showcode.php?id=45

AXMD
Radioactive
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179

Win 98, Win XP Home SP2
D3 Prof, D7 Pers, D2005 Pers
BeitragVerfasst: So 13.02.05 14:03 
Hier die functions aus dem MSDN (Suche im MSDN GETLONGPATHNAME):

GetLongPathName

The GetLongPathName function converts the specified path to its long form. If no long path is found, this function simply returns the specified name.

ausblenden Quelltext
1:
2:
3:
4:
5:
DWORD GetLongPathName(
  LPCTSTR lpszShortPath,
  LPTSTR lpszLongPath,
  DWORD cchBuffer
);


GetShortPathName

The GetShortPathName function retrieves the short path form of the specified path.

ausblenden Quelltext
1:
2:
3:
4:
5:
DWORD GetShortPathName(
  LPCTSTR lpszLongPath,
  LPTSTR lpszShortPath,
  DWORD cchBuffer
);

_________________
Radioactive
"Wer scrollt, verliert!" Matthias Stein, Informatiklehrer am GG


Zuletzt bearbeitet von Radioactive am So 13.02.05 14:33, insgesamt 1-mal bearbeitet
Harry M. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754

Win 2000, XP
D2005
BeitragVerfasst: So 13.02.05 14:14 
die funktion funtz nur für den dateinamen aber nicht für dne gesamten path. soweit war ich mir der anderen funktion die hier im forum gefunden hatte auch schon.

aus dem MSDN GETLONGPATHNAME werde ich nicht schlau. hau mich doch mal einer das brett vorn kopp :oops:
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: So 13.02.05 20:35 
GetLongPathName aus der MSDN funktioniert nicht immer. Ich hab das damit mal versucht und bei einigen Kurzen Namen rekonstruiert er nur Teilweise den Langen Dateiname. Soll heißen, dass er aus C:\Progra~1\TestPf~1 macht er nur C:\Programme\TestPf~1. Ein erneutes GetLongPathname ändert daran auch nix :(

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
blackbirdXXX

ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1077
Erhaltene Danke: 1

Ubuntu Dapper

BeitragVerfasst: Mo 14.02.05 10:28 
@BenBE: Wie wäre es mit Pfad bei \ in ein array spliten, die funktion über die einzelnen SLices drüberlasse und wieder zusammenbasteln?

_________________
Klein, schwarz und ärgert Techniker? Jumper!
Harry M. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754

Win 2000, XP
D2005
BeitragVerfasst: Mo 14.02.05 18:53 
gehts den nicht nen bischen einfacher???
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: Mo 14.02.05 18:57 
User-Xy2004 hat folgendes geschrieben:
gehts den nicht nen bischen einfacher???
Hier findest du ein Beispiel:

www.delphi-forum.de/...p;highlight=longpath

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.
Harry M. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754

Win 2000, XP
D2005
BeitragVerfasst: Mo 14.02.05 20:22 
genau das was ich gesucht habe! danke danke danke