INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

always troubles with copy

always troubles with copy

(OP)
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\www\Test\*.*',1)

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\www\Test\'
run('command.com /c copy SiteWeb\*.* '&RepertoireCible&'*.*',1)

but this way don't works.

Thank's for your help

best regards

Philippe


RE: always troubles with copy

(OP)
oups,

you must read

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

and not

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

RE: always troubles with copy

(OP)
hi,

I think the problem is the space between Program and Files in the string 'c:\Program Files\EasyPHP-5.3.9\www\Test\'.

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

RE: always troubles with copy

(OP)
Finally, the good way is

run('command.com /c xcopy SiteWeb\*.*/e/y '&shortpath(clip(GNT:DossierSiteWeb))&'*.*',1)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close