Jump to content
Fivewin Brasil

Renomear Pasta/Diretório


kapiaba

Recommended Posts


// 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


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...