Autor Beitrag
Alice
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 120



BeitragVerfasst: Sa 30.10.04 15:58 
hi all,

die renamefile funktion funkt. nicht.
habe schon alles versucht: also path in hochkommas, gross kein schreibung (was ja eing. egal sein sollte)
stimmt soweit alles, nur umbenannt wird nichts.

gibt es da eine lösung? die 100% geht?

ich benutze delphi 5 mit xp pro.

alice

Moderiert von user profile iconChristian S.: "URGENT!" aus Titel entfernt
Sprint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 849



BeitragVerfasst: Sa 30.10.04 16:22 
ausblenden Delphi-Quelltext
1:
2:
  if not RenameFile('C:\TEMP\MyFile.txt', 'C:\TEMP\MyFile2.txt') then
    RaiseLastWin32Error;

Versuche mal RenameFile so zu verwenden und sag' uns was für eine Fehlermeldung du bekommst.

_________________
Ciao, Sprint.
Alice Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 120



BeitragVerfasst: Sa 30.10.04 17:43 
hi,

es ist der fehler mit dem code 123.

"die syntax für den dateinamen, verzeichnissnamen oder die datenträgerbez. ist falsch".

wenn ich mit hochkommas versuche also den path in hochkommas setze dann kommt der fehler nr 3.

folg. datei soll umbenannt werden:

C:\Bearbeitete Fotos\IMG_0470 (2).jpg

zu:

C:\bearbeitete_fotos\img_0470_-2-.jpg

weiss jemand hier weiter? :?

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

Win 2000, XP
D2005
BeitragVerfasst: Sa 30.10.04 18:01 
zeige mir mal genau deinen code
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Sa 30.10.04 18:03 
Das Problem ist, dass hierbei ein neuer Ordner erstellt werden muss.

Schau dir mal in der D-Hilfe die Funktion: Suche in: Delphi-Forum, Delphi-Library CREATEDIRECTORY an.