Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

always troubles with copy

Status
Not open for further replies.

berthoud

Technical User
Oct 31, 2010
51
FR
Hi everybody,

For copying all files of a path to another, I use this way

! Copie du répertoire Photos dans le dossier SiteWeb
run('command.com /c copy photos\*.* SiteWeb\photos\*.*',1)

Now I want to copy the entire path SiteWeb to another place. I try this

! Copie du répertoire SiteWeb dans le dossier du serveur
run('command.com /c copy SiteWeb\*.* c:\Program Files\EasyPHP-5.3.9\
but I have an error "too many parameters". DO you know why?

The final must be :

! Copie du répertoire SiteWeb dans le dossier du serveur
RepertoireCible" = 'c:\Program Files\EasyPHP-5.3.9\run('command.com /c copy SiteWeb\*.* '&RepertoireCible&'*.*',1)

but this way don't works.

Thank's for your help

best regards

Philippe
 
oups,

you must read

run('command.com /c copy SiteWeb\*.* '&RepertoireCible"&'*.*',1)

and not

run('command.com /c copy SiteWeb\*.* '&RepertoireCible&'*.*',1)

 
hi,

I think the problem is the space between Program and Files in the string 'c:\Program Files\EasyPHP-5.3.9\
In fact, the real code is :

FILEDIALOG('Choisissez un répertoire!',GNT:DossierSiteWeb, ,FILE:LongName+FILE:KeepDir+FILE:Directory)
run('command.com /c copy SiteWeb\*.* '&GNT:DossierSiteWeb&'*.*',1)


where GNT:DossierSiteWeb may be c:\Program Files\xxxx\yyyy (so, with a space)

What is the solution to resolve this.

Thank's for your help

Have a good day
 
Finally, the good way is

run('command.com /c xcopy SiteWeb\*.*/e/y '&shortpath(clip(GNT:DossierSiteWeb))&'*.*',1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top