 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
mlr0911
Joined: 13 Jul 2007 Posts: 35 Country: United States |
|
FileCopy/FileMove |
|
Is it possible to Dim a location of a destination file for FileCopy?
I have successfuly Dim'd the root location of teh file, but I can't seem to get the destination to work. The file name that appears in the root directory needs to be moved as is to the destination directory, these file names change on a monthly basises.
Example:
Where Carea=C: (Current location)
Where Darea=X: (Desination Location)
Dim (CArea,string)
Dim (DArea, string)
filecopy (cArea,Darea)
I can't use the following:
file copy (carea,"x:\\move here.txt")
because the file names changes on a monthly basis.
Thanks for your help.
|
|
Fri Oct 12, 2007 12:17 pm |
|
 |
mlr0911
Joined: 13 Jul 2007 Posts: 35 Country: United States |
|
|
|
Can this be done?
|
|
Fri Oct 12, 2007 4:03 pm |
|
 |
DLUTER
Joined: 16 Mar 2007 Posts: 44 Country: United States |
|
|
|
Hi mlr0911,
Yes that can be done; here is a script that you should be able to make use of. Obviously change the file wildcard to something that works with your situation.
** Begin Script **
Dim vCopy, String "c:\\xtemp\\*.txt"
Dim vDest, String "c:\\xtemp\\xtemp2\\"
Dim vProc, Number
FileMoveEx ( vCopy, vDest, vProc )
** End Script **
This script will move (not copy) all .txt files in the directory listed in vDest. You can change the string on vDest to any mapped drive on the system. For copies you need to list the file by name.
|
|
Fri Oct 12, 2007 5:44 pm |
|
 |
mlr0911
Joined: 13 Jul 2007 Posts: 35 Country: United States |
|
|
|
Thanks DLUTER, I will try this on Monday when I get back in the office.
Thanks for you help
mlr0911
|
|
Fri Oct 12, 2007 8:52 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|