I have the following Script,
more +1 "C:\Documents and Settings\Administrator\Desktop\Backup Data\import file\1.txt" > "C:\Documents and Settings\Administrator\Desktop\Backup Data\import file\2.txt"
"C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE" "C:\Power Play\Daily\Daily.mdb" /x "Macro1"
DEL "C:\Documents and Settings\Administrator\Desktop\Backup Data\import file\*.*" /q
The first line I'm doing since my text file comes with a blank line at the top then followed with the titles then the data.
My problem is the following, sometimes the text file contains only blank line and header. So after truncation, i end up with only headers.That is causing me a problem when I am importing the data into access.
Can anyone provide me in a way where I can stop import into access if the file is empty