kapiaba Posted May 5, 2016 Report Share Posted May 5, 2016 // RENAMED.PRG - Perfect. #include "fivewin.ch" function main( ) LOCAL cOld, cNew cOld := PADR("C:\TEST", 20) cNew := PADR("C:\TESTY", 20) MsgGet( "Entre Carpeta Old", "Carpeta Old:", @cOld) MsgGet( "Entre Carpeta New ", "Carpeta New:", @cNew) if .not. empty( cNew ) Cambia_Dir( cOld, cNew ) endif return nil function Cambia_Dir( cOld, cNew ) if ! empty( cOld ) .and. ! empty( cNew ) if myrename( cOld, cNew ) ? "Nombre Cambiado" else ? "Imposible ReNombrar Carpeta o no ejiste" endif endif return nil #pragma BEGINDUMP #include <hbapi.h> #include <hbapifs.h> HB_FUNC( MYRENAME ) { const char * oldname = hb_parc( 1 ); const char * newname = hb_parc( 2 ); hb_retl( hb_fsRename( oldname, newname ) ); } #pragma ENDDUMP Theotokos 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.