'************************************************************************ ' ' Umbenennen/Verschieben von Windows95-Files mit PowerBASIC 3.2/3.5 ' ' entwickelt von Th.Gohel FidoNet : Thomas Gohel@2:2410/330.1 ' InterNet: support@pbsound.snafu.de ' Homepage: http://www.snafu.de/~pbsound/ ' ' Errorcodes: 0 = alles Banane :) ' 2 = File not found ' 3 = Path not found ' 5 = Access denied ' 17 = diffenret volume ' '************************************************************************ DECLARE FUNCTION GetStrLoc (BYVAL INTEGER) AS INTEGER PRINT Move95%("File1.Test","File2.Test") FUNCTION Move95%(BYVAL File1$, Byval File2$) public File1$ = File1$ + CHR$(0) ' Make ASCIZ-String File2$ = File2$ + CHR$(0) ! push ds ; DS auf Stack ! les di, File1$ ; Handle von File1$ holen ! push di ; auf Stack ! call GetStrLoc ; Adresse holen ! push dx ; DS:DX auf Stack ! push ax ; ! les di, File2$ ; Handle von File1$ holen ! push di ; auf Stack ! call GetStrLoc ; Adresse holen ! mov es, dx ; ES:DI neuer Filename ! mov di, ax ; ! pop dx ; DS:DX alter Filename, vom ! pop ds ; Stack holen ! mov ax, &h7156 ; Rename/Move File ! int &h21 ; und ab die Banane ! pop ds ; ups, da war noch was ... :)) ! jc Move95_Ok ; Fehler??? ! xor ax, ax ; wenn nicht, Fehlercode l”schen Move95_Ok: ! mov FUNCTION, ax ; gell, und Error eintragen ;) END FUNCTION