Autor Beitrag
WEBSTER
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 94



BeitragVerfasst: Mi 27.06.07 16:32 
Salute,

ich habe mir ein Tool entwickelt. Welches einen CopyString in ein Memo schreibt. Das Memo speichere ich dann mit savetofile als Batch ab.

In diesem steht dann z.B.

ausblenden Quelltext
1:
xcopy "Z:\Sicherung_Kundenrechner\Wanja\PC01\Dokumente und Einstellungen\All Users\Startmenü\Programme\Programme\Brockhaus Multimedia\Brockhaus multimedial\Data\BMMUSER.LD" "F:\DVD\DVD3\Sicherung_Kundenrechner\Wanja\PC01\Dokumente und Einstellungen\All Users\Startmenü\Programme\Programme\Brockhaus Multimedia\Brockhaus multimedial\Data\" /C /H /Y					


Das Problem liegt darin, wenn ich das Batchfile ausführe kopiert er mir genau die Dateien nicht, die einen Umlaut im Pfad stehen haben.

Der Umlaut Ü wird wärend des Kopiervorgangs als ³ dargestellt. Wenn ich den Copysting aber mit copy&paste in einee Boxbox eingebe funktioniert der Kopiervorgang.

Wie kann ich dieses Problem lösen....?

THX
WEBSTER

_________________
Wer etwas anders macht, aber nicht besser, der sollte besser etwas anderes machen.
Calculon
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 676

Win XP Professional
Delphi 7 PE, Delphi 3 PRO
BeitragVerfasst: Mi 27.06.07 17:12 
Dazu gab's hier schonmal'n Thread.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10184
Erhaltene Danke: 1259

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mi 27.06.07 17:50 
Moin!

Ganz konkret: die Systemfunktionen OemToChar()bzw. CharToOem()im MSDN oder in der Online-Hilfe nachschlagen. :idea:

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
WEBSTER Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 94



BeitragVerfasst: Mi 27.06.07 21:38 
Salute,

danke für den Tipp. Habe es Dank deines Hinweises so gelöst:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
function ANSI2ASCII(AText:string):string;
const MaxLength = 512;
var PText : PChar;
begin
  PText:=StrAlloc(MaxLength);
  StrPCopy(PText,AText);
  {$IFDEF WIN32}
  CharToOEM(PText,PText); {32Bit}
  {$ELSE}
  AnsiToOEM(PText,PText); {16Bit}
  {$ENDIF}
  Result:=StrPas(PText);
  StrDispose(PText);
end;



THX
WEBSTER

_________________
Wer etwas anders macht, aber nicht besser, der sollte besser etwas anderes machen.
hathor
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 28.06.07 16:20 
Geht es so auch?
ausblenden Delphi-Quelltext
1:
Memo1.OEMConvert:= true;