Autor Beitrag
Freeman1982
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24

Windows XP

BeitragVerfasst: Sa 28.05.05 22:09 
Hallo

ich habe mit dieser Funktion

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
Function GetSpecialFolder (aFolder: Integer): String;
var
  pIdL: PItemIDList;
  path2: Array [0..Max_Path] Of Char;
  Allocator: IMalloc;
Begin
  // ItemIdList für den Ordner holen
  SHGetSpecialFolderLocation (0, aFolder, pIdL);


  // ItemIdList in String umwandeln lassen
  SHGetPathFromIDList (pIDL, Path2);

 
  // Speicher wieder freigeben
  If Succeeded (SHGetMalloc (Allocator)) Then  
    Begin
      Allocator.Free (pIdL);
      {$IFDEF VER100}
      Allocator.Release;  
      {$ENDIF}
    End;  


  Result := Path2;
End;


den Aktuellen Pfad meines Desktops herausgefunden

Wie kann ich den Pfad jetzt benutzen das ich auch eine exe Datei dahin kopirene kann??

MfG

Freeman

Moderiert von user profile iconAXMD: Delphi-Tags hinzugefügt.
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: Sa 28.05.05 22:15 

_________________
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.
Freeman1982 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24

Windows XP

BeitragVerfasst: Sa 28.05.05 23:45 
Titel: File Copy
ich versteh das nicht.

mit drm Code gebe ich den Pfad ja in einem Message Dialoge aus

MessageDlg (GetSpecialFolder (CSIDL_FAVORITES), mtInformation, [mbOK], 0);

wie kann ich den Code in einen Strig umwandeln damit ich mit dem File Copy Befehl

Copy(path+'\Candy Shop\ShopSystem.exe',Zielpfad);

die Datei Shop Exe auf deb Desktop Kopieren kann oder noch besser nur die Verknüpfung.

Bitte um Hilfe

Mfg

Freeman1982
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: So 29.05.05 08:12 
Zitat:
ich versteh das nicht.

mit drm Code gebe ich den Pfad ja in einem Message Dialoge aus

MessageDlg (GetSpecialFolder (CSIDL_FAVORITES), mtInformation, [mbOK], 0);

wie kann ich den Code in einen Strig umwandeln damit ich mit dem File Copy Befehl

Copy(path+'\Candy Shop\ShopSystem.exe',Zielpfad);

die Datei Shop Exe auf deb Desktop Kopieren kann oder noch besser nur die Verknüpfung.

Bitte um Hilfe

Mfg
:?

Wie bekommst du den string von deiner Funktion denn zurück?
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: So 29.05.05 09:29 
Freeman, würdest du dich bitte für einen Beitrag entscheiden. :roll: Oder schreibst du einen weiteren neuen Beitrag (in dem es aber auch um das Kopieren einer Datei aus den Desktop geht), wenn dir jemand einen unbekannten Befehl nennt?

Das werde ich dann gleich mal machen: Suche in: Delphi-Forum, Delphi-Library "SHFILEOPERATION FO_COPY".