Hi Josh I have this Menu program that direct files from three main programs in three data files.
I have the following programm
Programs: Menu, Savings Prog , Loans Prog , Customer Details Prog
With the associated Data folders: SavingsData, LoansData, CustomerDetailsData
I will like to use the filecopy function to copy all files with .dat from the savingsData of each keyer into
Keyer1Data folder for Keyer1, Keyer2Data folder for Keyer2 etc.
I will like to do same for Loans and Customers.
I have 10 keyers and going through the data folders to copy manually is a real task and time consuming, i just read on this forum on the use of the filecopy and fileconcat functions. I check the CSpro help menu i had some information but i still more clarification.
I my case which global proc do i need to place the function - filecopy("*.dat", "myfolder"); (Menu or individual program).
After filecopy i want to use the fileconcat function - fileconcat("c:\prov1\prov1.dat", "c:\prov1\01*.dat"); Which proc and prog do i need to use this function.
Thanks in advance
Filecopy and Fileconcat function
Re: Filecopy and Fileconcat function
Are the enumerator folders connected to a server? Or they are stand alone? Do you have the folders in the same location on all tablets? If the enumerator folders have a common path or being run on a server, then its quite easy, and I can send you a code for that.
Re: Filecopy and Fileconcat function
Thanks saint , the folders have a common path. The entry was was done on a stand alone workstation but
all their folders are now on a workstation. NB: During the entry keyers are not restricted to a workstation though.
Let me explain further, now i have a CusSatSurveyFolder in my C drive which contains:
1. Menufolder and in the menu folder is the menuProg and .dat for the menu
2. SavingsProgfolder and in the Savings folder contains the savingsProg only
3.LoansProgFolder and in it contains the LoansProg only etc.
4.SavingsDataFolder which contains all the 10 keyers data on savings
5. LoansDataFolder also contains all the 10 Keyers data on Loans etc
NB: The entry is completed and i want to group the files in the SavingsDataFolder into Keyer1 , Keyer2 Folder etc based on their ID which is part of the file name
using this standalone machine am now using.
The same logic will be used for Loans and Customers details as well.
all their folders are now on a workstation. NB: During the entry keyers are not restricted to a workstation though.
Let me explain further, now i have a CusSatSurveyFolder in my C drive which contains:
1. Menufolder and in the menu folder is the menuProg and .dat for the menu
2. SavingsProgfolder and in the Savings folder contains the savingsProg only
3.LoansProgFolder and in it contains the LoansProg only etc.
4.SavingsDataFolder which contains all the 10 keyers data on savings
5. LoansDataFolder also contains all the 10 Keyers data on Loans etc
NB: The entry is completed and i want to group the files in the SavingsDataFolder into Keyer1 , Keyer2 Folder etc based on their ID which is part of the file name
using this standalone machine am now using.
The same logic will be used for Loans and Customers details as well.
Re: Filecopy and Fileconcat function
Hi Saint pls can you share your codes. thanks
Re: Filecopy and Fileconcat function
If it is only 10 keyers I wouldn't bother trying to write logic to do it automatically. I would just do it by hand using the concatenate data tool.
Re: Filecopy and Fileconcat function
Thanks Josh, I am interested in knowing how to apply these functions
Can i get an example of the use of the fileconcat and filecopy.
Thanks
Can i get an example of the use of the fileconcat and filecopy.
Thanks
Re: Filecopy and Fileconcat function
I don't have any examples other than what is in the online documentation. They are not functions that get used very often. Maybe someone else on the forum has an example.
Re: Filecopy and Fileconcat function
hello,
you will create a concatenate folder on your C drive. Then copy this function on your proc global
you will create a concatenate folder on your C drive. Then copy this function on your proc global
Code: Select all
function concatenate();
fileconcat("C:/concatenate/SavingsData.dat","C:/SavingsDataFolder/*.dat");
fileconcat("C:/concatenate/LoansData.dat","C:/LoansDataFolder/*.dat");
end;