#include "fwce.ch"
function Main()
local oDlg
DEFINE DIALOG oDlg TITLE "Test" SIZE 200, 100
ACTIVATE DIALOG oDlg CENTERED
MsgInfo( "execution continues" )
return nil
#include "fwce.ch"
#define WS_POPUP 0x80000000
#define WS_VISIBLE 0x10000000
#define WS_BORDER 0x00800000
#define WS_DLGFRAME 0x00400000
function Main()
local oDlg
DEFINE DIALOG oDlg TITLE "Test" SIZE 200, 100 STYLE nOr( WS_POPUP, WS_VISIBLE, WS_BORDER, WS_DLGFRAME )
ACTIVATE DIALOG oDlg CENTERED
MsgInfo( "execution continues" )
return nil
#include "fwce.ch"
function Main()
local oDlg
DEFINE DIALOG oDlg TITLE "Test" SIZE 200, 100
@ 1, 1 BUTTON "Create folder" SIZE 50, 10 ACTION MsgInfo( lMkDir( CurDir() + "\a_folder" ) )
@ 2, 1 BUTTON "Remove it" SIZE 50, 10 ACTION MsgInfo( RmDir( CurDir() + "\a_folder" ) )
ACTIVATE DIALOG oDlg CENTERED
return nil
#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
LPWSTR AnsiToWide( char * );
HB_FUNC( RMDIR )
{
LPWSTR pW = AnsiToWide( hb_parc( 1 ) );
hb_retl( RemoveDirectory( pW ) );
hb_xfree( pW );
}
#pragma ENDDUMP
Antonio Linares wrote:4.
- Code: Select all Expand view
#include "fwce.ch"
function Main()
local oDlg
DEFINE DIALOG oDlg TITLE "Test" SIZE 200, 100
@ 1, 1 BUTTON "Create folder" SIZE 50, 10 ACTION MsgInfo( lMkDir( CurDir() + "\a_folder" ) )
@ 2, 1 BUTTON "Remove it" SIZE 50, 10 ACTION MsgInfo( RmDir( CurDir() + "\a_folder" ) )
ACTIVATE DIALOG oDlg CENTERED
return nil
#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
LPWSTR AnsiToWide( char * );
HB_FUNC( RMDIR )
{
LPWSTR pW = AnsiToWide( hb_parc( 1 ) );
hb_retl( RemoveDirectory( pW ) );
hb_xfree( pW );
}
#pragma ENDDUMP
Antonio Linares wrote:4.
- Code: Select all Expand view
#include "fwce.ch"
function Main()
local oDlg
DEFINE DIALOG oDlg TITLE "Test" SIZE 200, 100
@ 1, 1 BUTTON "Create folder" SIZE 50, 10 ACTION MsgInfo( lMkDir( CurDir() + "\a_folder" ) )
@ 2, 1 BUTTON "Remove it" SIZE 50, 10 ACTION MsgInfo( RmDir( CurDir() + "\a_folder" ) )
ACTIVATE DIALOG oDlg CENTERED
return nil
#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
LPWSTR AnsiToWide( char * );
HB_FUNC( RMDIR )
{
LPWSTR pW = AnsiToWide( hb_parc( 1 ) );
hb_retl( RemoveDirectory( pW ) );
hb_xfree( pW );
}
#pragma ENDDUMP
xfood wrote:hi,
removes only empty folders
how do I delete the folders full of files?
xfood wrote:HELLO,
you can have a function to FWPPC taking out the folder and all
files, including sub folders?
Many thanks to all
#include "Fivewin.ch"
#include "Directry.ch"
FUNCTION MAIN()
? LMKDIR( "TEST" )
? MEMOWRIT( "TEST\TEST.TXT", "This is a test" )
? DELETEDIR( "TEST" )
RETURN NIL
FUNCTION DELETEDIR( cDir )
LOCAL aDir, cName
LOCAL i
aDir = DIRECTORY( cDir + "\*.*", "HRD" )
FOR i = 1 TO LEN( aDir )
cName = aDir[ i, F_NAME ]
IF cName == "."; LOOP; ENDIF
IF cName == ".."; LOOP; ENDIF
cName = cDir + "" + cName
IF "D" $ aDir[ i, F_ATTR ]
IF !DELETEDIR( cName )
RETURN .F.
ENDIF
ELSE
IF FERASE( cName ) = -1
? "Impossibile cancellare il file " + cName + "."
RETURN .F.
ENDIF
ENDIF
NEXT
IF !LRMDIR( cDir )
? "Impossibile cancellare la cartella " + cDir + "."
RETURN .F.
ENDIF
RETURN .T.
xfood wrote:scusami.
la funzione LRMDIR esiste un FWPPC?
Return to FiveWin for Pocket PC
Users browsing this forum: No registered users and 9 guests