Page 1 of 1

Importing Punches using import_punches.php

Posted: Wed Jan 25, 2012 12:40 pm
by angelines
I'm having trouble importing punches using the import_punches.php.

I edited the import_punches.csv and import_punches2.csv using the same format as it is when timetrex was installed (found in timetrex/tools/import/...).

I did not edit the import_punches.php file as I am new to this and don't know if there's anything that I should edit in there.

When I run the command line:
c:\timetrex\php\php.exe c:\timetrex\timetrex\tools\import\import_punches.php

it gives:
Usage: import_punches.php [OPTIONS] [Column MAP file] [CSV File]
Options: -n Dry-run, display the first two lines to confirm mapping is correct
WARNING: Clear TimeTrex cache after running this.

I cleared the cache and checked Punches on TimeTrex and saw that nothing was imported.

What went wrong?

Re: Importing Punches using import_punches.php

Posted: Wed Jan 25, 2012 12:45 pm
by shaunw
You didn't provide the import script with the name of the file that contains the data that you wish to import. See the Usage: line in your comment, it tells you what command line arguments are required and in what order.

Re: Importing Punches using import_punches.php

Posted: Wed Jan 25, 2012 1:27 pm
by angelines
Ok, well as I mentioned earlier I never worked with .php files so I'm new to it. I'm attaching the file please tell me exactly where to input the file name. I changed the extension to .txt

The file name is import_punches.csv
The Column Map File is punch_column_map.txt

Thanks.

Re: Importing Punches using import_punches.php

Posted: Thu Jan 26, 2012 8:27 am
by angelines
Hi,

I got through. I worked on it and got it to work.

Thanks.