Hi,
I there a way to copy files from within FWH allowing wild cards.
I am tring to do something like:
cFileSource := "F:\Myfile*.*"
cFileDest := "C:\MyFolder\"
Copy File &cFileSource to &cFileDest
but I get a Open error for cFileSource
Thanks,
Jeff
Copy files with wild card
- Jeff Barnes
- Posts: 912
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
-
- Posts: 33
- Joined: Mon Oct 17, 2005 11:56 pm
- Location: Caracas, Venezuela
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- Jeff Barnes
- Posts: 912
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
It works for me
Dear Jeff,
This is an example that work for me.
Regards,
Dutch
**********************
aFiles1 = directory("*.db?")
aFiles2 = directory("*.fpt")
if !empty(aFiles1)
aTarget:= {}
aSource:= {}
for n := 1 to len(aFiles1)
aadd(aTarget,DayOfWeek+'\'+aFiles1[n][1])
aadd(aSource,aFiles1[n][1])
next
for n := 1 to len(aFiles2)
aadd(aTarget,DayOfWeek+'\'+aFiles2[n][1])
aadd(aSource,aFiles2[n][1])
next
copyfiles( aSource, aTarget )
endif
This is an example that work for me.
Regards,
Dutch
**********************
aFiles1 = directory("*.db?")
aFiles2 = directory("*.fpt")
if !empty(aFiles1)
aTarget:= {}
aSource:= {}
for n := 1 to len(aFiles1)
aadd(aTarget,DayOfWeek+'\'+aFiles1[n][1])
aadd(aSource,aFiles1[n][1])
next
for n := 1 to len(aFiles2)
aadd(aTarget,DayOfWeek+'\'+aFiles2[n][1])
aadd(aSource,aFiles2[n][1])
next
copyfiles( aSource, aTarget )
endif