Jump to content
Fivewin Brasil

Copiar muitos arquivos.


kapiaba

Recommended Posts

http://forums.fivetechsupport.com/viewtopic.php?f=6&t=35644&p=212224#p212224

 

Perfect mister Rao. Many thanks.

#Include "FiveWin.ch"
	static oWnd
	//----------------------------------------------------------------//
	FUNCTION Main()
	   LOCAL oBar, cOrigen, cDestino
	   cOrigen  := Curdrive()+":\fwh1701\samples\*.prg"
	   cDestino := Curdrive()+":\backup\"
	
   DEFINE WINDOW oWnd TITLE "Copiar Archivos"
	   DEFINE BUTTONBAR oBar _3D OF oWnd
	   DEFINE BUTTON OF oBar ACTION( Copiar( cOrigen, cDestino ), oWnd:End() )
	   SET MESSAGE OF oWnd TO "Copiar Archivos" NOINSET CLOCK DATE KEYBOARD
	   ACTIVATE WINDOW oWnd CENTER
	RETURN NIL
	//----------------------------------------------------------------//
	FUNCTION Copiar( cOrigen, cDestino )
	   LOCAL oFs
	   If .not. Lisdir( cDestino )
      LMkdir( cDestino )
   Endif
	   CURSORWAIT()
	   oFs   := CreateObject( "Scripting.FileSystemObject" )
	   // oFs:CopyFile( "z:\systems\xml\*.xml" , "r:\backups\systems\xml\", .t. ) // .t. for overwrite
	   oFs:CopyFile( cOrigen, cDestino, .T. ) // .t. for overwrite
	   CURSORARROW()
	   ? "Pronto..."
	RETURN NIL


 

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