Filecopy and Fileconcat function

Discussions about CSEntry
Post Reply
Anysia
Posts: 28
Joined: March 12th, 2016, 6:54 am

Filecopy and Fileconcat function

Post by Anysia »

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
Saint
Posts: 63
Joined: November 22nd, 2013, 4:59 am

Re: Filecopy and Fileconcat function

Post by Saint »

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.
Anysia
Posts: 28
Joined: March 12th, 2016, 6:54 am

Re: Filecopy and Fileconcat function

Post by Anysia »

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.
Anysia
Posts: 28
Joined: March 12th, 2016, 6:54 am

Re: Filecopy and Fileconcat function

Post by Anysia »

Hi Saint pls can you share your codes. thanks
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Filecopy and Fileconcat function

Post by josh »

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.
Alpha

Re: Filecopy and Fileconcat function

Post by Alpha »

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
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Filecopy and Fileconcat function

Post by josh »

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.
copernix2
Posts: 18
Joined: November 23rd, 2014, 7:46 am

Re: Filecopy and Fileconcat function

Post by copernix2 »

hello,
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;
Post Reply