1. Renaming Files
- Posted by CK Lester <cklester at yahoo.com> Apr 11, 2001
- 458 views
Guys 'n' Gals, I'm converting a DOS installer program to Windows, and I'll need a little help now 'n' then, I think. My first query is how can I rename files with Win32 code? The DOS version was using "rename()" from Daniel Bertein's "dos.e" code. I just want a simple "rename( old_name , new_name )" procedure that will work with the Windows interpreter, if anybody has it. Thanks! ck
2. Re: Renaming Files
- Posted by pampeano at ROCKETMAIL.COM Apr 11, 2001
- 451 views
--------------Boundary-00=_IRWMQL80000000000000 --------------Boundary-00=_IRWMLVC0000000000000 charset="iso-8859-1" If you're using win32lib, then you have the moveFile function, else you c= an download win32fil library that support that too, or wrap it yourself. Best Regards, Guillermo Bonveh=ED AKA: Knixeur, Red Knight, Caballero Rojo -------Original Message------- From: CK Lester=20 To: EUforum=20 Subject: Renaming Files Guys 'n' Gals, I'm converting a DOS installer program to Windows, and I'll need a little help now 'n' then, I think. My first query is how can I rename files with Win32 code? The DOS version was using "rename()" from Daniel Bertein's "dos.e" code. I just want a simple "rename( old_name , new_name )" procedure that will work with the Windows interpreter, if anybody has it. Thanks! ck --------------Boundary-00=_IRWMLVC0000000000000 Content-Type: Multipart/related; boundary="------------Boundary-00=_IRWMG6G0000000000000" --------------Boundary-00=_IRWMG6G0000000000000 Content-Type: Text/HTML; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <html> <head> <meta name=3D"GENERATOR" content=3D"IncrediMail 1.0"> </head> <BODY background=3D"" bgColor=3D#ffffff style=3D"BACKGROUND-POSITION: 0px= 0px; FONT-FAMILY: Arial" scroll=3Dyes ORGYPOS=3D"0"> <TABLE border=3D0 cellPadding=3D2 cellSpacing=3D0 id=3DINCREDIMAINTABLE w= idth=3D"100%"> <TBODY> <TR> <TD id=3DINCREDIHEADER width=3D"100%"></TD> </TR> <TR> <TD id=3DINCREDITEXTREGION width=3D"100%"> <DIV>If you're using win32lib, then you have the moveFile function,= else=20 you can download win32fil library that support that too, or wrap it= =20 yourself.</DIV> <DIV> </DIV> <DIV> <DIV>Best Regards,</DIV> <DIV> Guillermo Bonveh=ED</DIV> <DIV> AKA: Knixeur, Red Knight, Cabal= lero=20 Rojo</DIV> <DIV> </DIV></DIV> <DIV><I>-------Original Message-------</I></DIV> <DIV> </DIV> <DIV> </DIV> <DIV dir=3Dltr id=3Dfromshowfield><U><I>From:</I></U><B> CK Lester=20 <CKLESTER at YAHOO.COM></B></DIV> <DIV dir=3Dltr id=3Dtoshowfield><U><I>To:</I></U><B> EUforum=20 <EUFORUM at TOPICA.COM></B></DIV> <DIV dir=3Dltr id=3Dsubjectshowfield><U><I>Subject:</I></U><B> Rena= ming=20 Files</B></DIV><BR> = =20 =20 fast, safe relief from email headaches without<BR>medication! My To= pica's=20 free email management remedy is<BR>designed to remove that pain fro= m your=20 brain.<BR>Just what the doctor=20 g=20 "rename()" from Daniel Bertein's "dos.e" code. I just want a<BR>sim= ple=20 "rename( old_name , new_name )" procedure that will work with=20 the<BR>Windows interpreter, if anybody has it.<BR><BR>Thanks!<BR>ck= </TD> </TR> <TR> <TD id=3DINCREDIFOOTER width=3D"100%"> =09<TABLE cellPadding=3D0 cellSpacing=3D0 width=3D"100%"> =09<TBODY> =09<TR> =09<TD width=3D"100%"></TD> =09<TD align=3Dmiddle id=3DINCREDISOUND vAlign=3Dbottom></TD> =09<TD align=3Dmiddle id=3DINCREDIANIM vAlign=3Dbottom></TD> =09</TR> =09</TBODY> =09</TABLE> </TD> </TR> </TBODY> </TABLE><SPAN=20 id=3DIncrediStamp><FONT face=3D"Arial, Helvetica, sans-serif"=20 --------------Boundary-00=_IRWMG6G0000000000000-- --------------Boundary-00=_IRWMLVC0000000000000-- --------------Boundary-00=_IRWMQL80000000000000--
3. Re: Renaming Files
- Posted by CK Lester <cklester at yahoo.com> Apr 11, 2001
- 448 views
Dear Ted, I did search the archives and found Win32Fil.ew, but didn't realize that MoveFile could function the same as "rename." I should have known that, though!Thanks for the verbal abuse, ck ----- Original Message ----- From: "Ted Fines" <fines at macalester.edu> To: "EUforum" <EUforum at topica.com> Subject: RE: Renaming Files > Search the EU archives and you'll find win32fil.ew, which contains the > functionality you need. > > Not that I ALWAYS rememebr to do this, but as a gentle reminder to all, it > would be better for people to at least search the EU file archives for > something they're looking for, before posting a question to the list... > > --Ted
4. Re: Renaming Files
- Posted by Derek Parnell <ddparnell at bigpond.com> Apr 13, 2001
- 434 views
Thanks Guillermo, I've updated the library to create an alias for moveFile() called renameFile(). ------ Derek Parnell Melbourne, Australia "To finish a job quickly, go slower." ----- Original Message ----- From: pampeano at ROCKETMAIL.COM Subject: Re: Renaming Files >If you're using win32lib, then you have the moveFile function, >else you can download win32fil library that support that too, >or wrap it yourself.