0

I'm trying to export the table overnight using the Windows Task scheduler, if i manually login to command prompt and execute the below three commands one-by-one it works fine. csv file will be created on the destination directory. If I try to create a bat script and try to execute the same, it stops after executing first line(i need to manually type the second line), is there a way to automate it please?

psql -U nrgadmin -d enwdb
\copy nrgcore.bookmarks to 'D:\Bookmarks_Table\Bookmarks.csv' csv;
\q
a_horse_with_no_name
  • 497,550
  • 91
  • 775
  • 843
Anil Kumar
  • 475
  • 4
  • 21

0 Answers0