Page 1 of 1

Export undeliverables in a script with watch folders

Posted: Fri Jan 30, 2009 11:29 am
by Eric
Use this two line command to export your undeliverables. This command assumes you have the Script Monitor - Write Input Files command as the second event of your script

Code: Select all

com_InputFilePath=FILETOSTR("Cleanup.ini")
COPY TO (FORCEEXT(com_InputFilePath,"")+"_undeliverable.dbf") FOR dpv_="N"
To export as comma delimited text with the field names added as a header record:

Code: Select all

COPY TO (FORCEEXT(DBF(),"")+"_undeliverable.dbf") FOR dpv_="N" TYPE CSV
To export as comma delimited text with no header record:

Code: Select all

COPY TO (FORCEEXT(DBF(),"")+"_undeliverable.dbf") FOR dpv_="N" TYPE DELIMITED
If you want to export specific fields, use this:

Code: Select all

COPY TO (FORCEEXT(DBF(),"")+"_undeliverable.dbf") FIELDS first,last,zip FOR dpv_="N" TYPE CSV