Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copying folders on to a pen drive
Message
 
 
À
18/02/2009 07:19:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Vista
Network:
Windows 2003 Server
Divers
Thread ID:
01382606
Message ID:
01382608
Vues:
65
#DEFINE FOF_NOCONFIRMATION         0x0010  && Don't prompt the user.
#DEFINE FOF_NOCONFIRMMKDIR         0x0200  && don't confirm making any needed dirs
#DEFINE FOF_NOERRORUI              0x0400  && don't put up error UI

lcSourceFolder = "h:\tmp\"
lcDestinationFolder = "h:\aaa\TmpCopy"

lnFlag = FOF_NOCONFIRMATION + FOF_NOCONFIRMMKDIR + FOF_NOERRORUI

loShell		= CreateObject("Shell.Application")
loFolder	= loShell.NameSpace(lcDestinationFolder)
loFolder.CopyHere(lcSourceFolder, lnFlag )
>
>Thanks to the replies to my earlier thread.
>
>I am actually only a very part-time foxpro programmer. I have been asked to create a utility so users can copy/backup their files to a pen drive by clicking on a foxpro form.
>I have the code below
>
>! /2 xcopy C:\temp F:\test /i /y /e
>
>The code works. But copys the files within the folders only . I want to copy the whole folder.
>Also is it possible not to show the Dos window. I've tried removing the /2 but the Dos window still appears.
>
>
>here the parameters mean:
>*2 : dos window active and minimized, *i : if the soursce directory does not exist in destination directory it creates.
>*y : overwrites existing files or folders, *e : copying directories and subdirectories including empty ones
>
>Thanks in advance.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform