Simplicty and flexibility!


move files from a directory to another directory using CDF


Started by Marco Marchesi
Search
You will need to Sign In to be able to add or comment on the forum!

move files from a directory to another directory using CDF

There is a way to copy file(s) from a directory to another using a CDF function? I've tried to use CopyAFile but it seems to me that it's not work with multiple file using star convention (*.*)


Written by Marco Marchesi 31/10/13 at 09:17:24 DataEase for Windows 7.x

Re:move files from a directory to another directory using CDF

Download Sample

Firstly sorry for the late reply. We are suffering from a bout of flu in the organisation so our resources is even harder stretched than normal ;-)

So back to the challenge and hand:

Copy is an internal command in Windows and can't be called directly as a program. The way around that is to call it from a .BAT file with parameters and then

call the Bat file with FileExec.

Content of MyCopy.Bat is simply copy %1 %2 which means copy from Paramter1 to Parameter2 on the command line.


Written by DataEase Tech Sup. 01/11/13 at 09:20:13 DataEase for Windows 7.x

Re:move files from a directory to another directory using CDF

Hello! What can you suggest, if I need to move files from variable directories to one directory? I have a field, where the path to the file is shown, if this information is required. Wish, you will help me.


Written by Max MacKeel 02/11/13 at 16:06:58 Dataease [{8}]FIVE

Re:Re:move files from a directory to another directory using CDF

In our sample i use to fixed catalogues that are sub-directories of the app catalogue, but you can use the same method with variable catalogues and full paths too.

Simply derive the function rather than "hard code" it.

FileExec(concat("mycopy.bat ",MyPathFieldFrom," ",mypathfieldto),1,0,0,0,0)


Written by DataEase Tech Sup 04/11/13 at 08:28:26 Dataease [{8}]FIVE

Re:Re:Re:move files from a directory to another directory using CDF

Many thanks for your reply. I will try to use fileexec for copying and removedir to remove the old directory.


Written by Marco Marchesi 07/11/13 at 15:34:49 Dataease [{8}]FIVE
DG3_ForumList