Hello,
Can someone please help me out with the command for how to set file date and time.
Best regards
Otto
#include "FiveWin.ch"
#include 'common.ch'
#define SW_HIDE 0
#define SW_NORMAL 1
#define SW_SHOWMINIMIZED 2
#define SW_RESTORE 9
//------------------------------------*
// Deritrizes de fazer copia ou mover *
//------------------------------------*
#define FO_MOVE 0x0001
#define FO_COPY 0x0002
#define FO_DELETE 0x0003
#define FO_RENAME 0x0004
#define FOF_MULTIDESTFILES 0x0001
#define FOF_CONFIRMMOUSE 0x0002
#define FOF_SILENT 0x0004 // don't create progress/report
#define FOF_RENAMEONCOLLISION 0x0008
#define FOF_NOCONFIRMATION 0x0010 // Don't prompt the user.
#define FOF_WANTMAPPINGHANDLE 0x0020 // Fill in SHFILEOPSTRUCT.hNameMappings
// Must be freed using SHFreeNameMappings
#define FOF_ALLOWUNDO 0x0040
#define FOF_FILESONLY 0x0080 // on *.*, do only files
#define FOF_SIMPLEPROGRESS 0x0100 // means don't show names of files
#define FOF_NOCONFIRMMKDIR 0x0200 // don't confirm making any needed dirs
#define FOF_NOERRORUI 0x0400 // don't put up error UI
#define FOF_NOCOPYSECURITYATTRIBS 0x0800 // dont copy NT file Security Attributes
#define FOF_NORECURSION 0x1000 // don't recurse into directories.
//----------------------------> Copia o arquivo
FUNCTION execopia( warq, warq1 )
warq1 := alltrim( warq1 )
RETURN SHFile( , FO_COPY , warq + Chr( 0 ) , warq1 )
#include "FiveWin.ch"
FUNCTION Main()
local cBuffer := Space( 12800 )
local nBufSize := 12800
hSource := FOpen( "Arquivo Original" )
hTarget := FCreate( "Arquivo Copia" )
While ( nBytes := FRead( hSource, @cBuffer, nBufSize ) ) > 0
FWrite( hTarget, cBuffer, nBytes )
SysRefresh()
End
FClose( hSource )
FClose( hTarget )
If File("Arquivo Copia")
...
Endif
Return nil
#include "FiveWin.ch"
FUNCTION Main()
LOCAL cDirServ, cDirLocal, cArquivo
cDirServ := "\x_Archivos\"
cDirLocal := "E:\"
cArquivo := "teste.txt"
__CopyFile( cDirLocal+cArquivo, cDirServ+cArquivo+"2" )
RETURN NIL
SetFDaTi( cFileName, dDate, cTime ) --> lSuccess
FileAttr()
FileDate()
FileTime()
SetFAttr()
SetFDaTi()
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 42 guests