
move files from a directory to another directory using CDF
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 (*.*)
Re:move files from a directory to another directory using CDF
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.
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.
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)