| View previous topic :: View next topic |
| Author |
Message |
nemisis010 Newbie

Joined: 29 May 2002 Posts: 17 Location: Australia
|
Posted: Fri Jun 25, 2004 3:42 am Post subject: Copy all files in a directory |
|
|
This is probably a simple query but how the hell do you copy all files in a directory to another directory. It seems pretty simple but i've tried everything i can think of.
Can anyone help please. _________________ ------------------------------------
Boo |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Fri Jun 25, 2004 5:11 am Post subject: |
|
|
Should be something like this:
| Code: | LIST CREATE,1
LIST FILELIST,1,C:\My Documents\*.*
IF @greater(@count(1),0)
LIST SEEK,1,0
REPEAT
FILE COPY,@item(1),D:\Backup Files\@name(@item(1)).@ext(@item(1))
%X = @next(1)
UNTIL @null(@item(1))@not(@ok())
END
LIST CLEAR,1
LIST CLOSE,1
|
_________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
nemisis010 Newbie

Joined: 29 May 2002 Posts: 17 Location: Australia
|
Posted: Fri Jun 25, 2004 7:04 am Post subject: Fantastic - works |
|
|
Thanks Garrett, that works great. Wasn't sure that lists would take of the problem.
Thanks again.  _________________ ------------------------------------
Boo |
|
| Back to top |
|
 |
Vic D'Elfant Past Contributor


Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Fri Jun 25, 2004 8:22 am Post subject: |
|
|
Note that the script which Garrett provided you does not copy the files that are stored in subdirectories.
If you want to have those copied too, I suggest you use the vdsflist.dll (part of the vdsdll3) and let it do a search for *.*, and then use that list to copy the files, since the vdsflist does search in subdirectories.
Just a thought
Vic _________________ phpBB Development Team |
|
| Back to top |
|
 |
|