diff -uNr ops-for-linux-v0.7/download_all_movies.c ops-for-linux-v0.7-kees/download_all_movies.c
--- ops-for-linux-v0.7/download_all_movies.c	2005-08-20 22:41:18.000000000 -0700
+++ ops-for-linux-v0.7-kees/download_all_movies.c	2005-08-26 18:16:53.000000000 -0700
@@ -1,2 +1,44 @@
 #include "ops-linux.h"
-gint idle_tag;
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+gboolean download_all_movies(GtkWidget *widget,
+			     GdkEvent *event,
+			     gpointer data)
+{
+	char logstr[STRINGSIZE];
+	gboolean first=TRUE;
+	file_info info;
+	struct stat statbuf;
+
+	// keep compiler quiet
+	widget=widget;
+	event=event;
+	data=data;
+
+	Log("Changing to p0 ...");
+	if (!ChangePartition(0)) return FALSE;
+	Log("Changing to /DCIM/100COACH ...");
+	if (!ChangeDirectory("/DCIM/100COACH")) return FALSE;
+	Log("Getting directory listing ...");
+	while (GetFileInfo(&info,first)) {
+		first=FALSE;
+		if (info.filetype==FIFILE) {
+			sprintf(logstr,"found: %s (%d)",info.filename,info.filesize);
+			Log(logstr);
+			if (stat(info.filename,&statbuf)>=0) {
+				sprintf(logstr,"%s already exists locally: skipping!",info.filename);
+				Log(logstr);
+			}
+			else if (!DownloadFile(info.filename,info.filename)) {
+				return FALSE;
+			}
+		}
+	}
+	Log("Finished downloading movies!");
+
+	return TRUE;
+}
+
diff -uNr ops-for-linux-v0.7/download_file.c ops-for-linux-v0.7-kees/download_file.c
--- ops-for-linux-v0.7/download_file.c	2005-08-21 01:32:18.000000000 -0700
+++ ops-for-linux-v0.7-kees/download_file.c	2005-08-26 18:02:11.000000000 -0700
@@ -48,7 +48,7 @@
   //NOTE: we keep grabbing bytes until the camcorder is done feeding us.
   x=0;
   round = 0;
-  gtk_progress_bar_set_fraction(m_ctl_progress, 0);
+  if (m_ctl_progress) gtk_progress_bar_set_fraction(m_ctl_progress, 0);
   while(1) {
     count=Read(buffer,BUFSIZE,TIMEOUT);
     //Log("reading...");
@@ -56,7 +56,7 @@
     //break;
     x += count;
     if (x - round > 65536) {
-      //gtk_progress_bar_set_fraction(m_ctl_progress, (gdouble)x / (gdouble)filesize);
+      //if (m_ctl_progress) gtk_progress_bar_set_fraction(m_ctl_progress, (gdouble)x / (gdouble)filesize);
       m_progressbar_fraction = (double)x / (double)filesize;
       round = x;
       //gtk_widget_show(main_window); //update?
@@ -227,6 +227,18 @@
   //  using_dialog_mutex = TRUE;
 
   file_selection_box = gtk_file_selection_new("Please select a file to download");
+
+
+  // fill in name of file for easy clicking
+  GtkTreeModel* model;
+  GtkTreeIter iter;
+  GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(m_directory_tree));
+  if (gtk_tree_selection_get_selected(selection, &model, &iter)) {
+    gchar* filename = NULL;
+    gtk_tree_model_get (model, &iter, COL_FILENAME, &filename, -1);
+    gtk_file_selection_set_filename(GTK_FILE_SELECTION(file_selection_box),
+		                    filename);
+  }
   
   gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION(file_selection_box)->ok_button),
 			     "clicked",
diff -uNr ops-for-linux-v0.7/ops-linux.c ops-for-linux-v0.7-kees/ops-linux.c
--- ops-for-linux-v0.7/ops-linux.c	2005-08-22 23:21:20.000000000 -0700
+++ ops-for-linux-v0.7-kees/ops-linux.c	2005-08-26 18:39:33.000000000 -0700
@@ -1,7 +1,21 @@
 #include "ops-linux.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <getopt.h>
+
+
+GtkWidget * m_ctl_progress = NULL;
+
+
 gboolean
 delete_event (GtkWidget * widget, GdkEvent * event, gpointer data)
 {
+  // quiet compiler
+  widget=widget;
+  event=event;
+  data=data;
+
   return FALSE;
 }
 
@@ -10,18 +24,30 @@
 void
 destroy (GtkWidget * widget, gpointer data)
 {
+  // quiet compiler
+  widget=widget;
+  data=data;
+
   gtk_main_quit ();
 }
 gboolean enable_buttons (GtkWidget* widget,
 			 GdkEvent *event,
 			 gpointer data) {
+  // quiet compiler
+  widget=widget;
+  event=event;
+  data=data;
+
   EnableControls(TRUE);
   return TRUE;
 
 }
 gboolean watch_progress_bar (gpointer data) {
+  // quiet compiler
+  data=data;
+
   //  printf("Wait!\n");
-  gtk_progress_bar_set_fraction(m_ctl_progress, m_progressbar_fraction);
+  gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(m_ctl_progress), m_progressbar_fraction);
   
   return TRUE;
 }
@@ -35,6 +61,13 @@
   GtkTreeModel* model;
   gpointer data;
   gchar* filename;
+
+  // quiet compiler
+  treeview=treeview;
+  arg1=arg1;
+  arg2=arg2;
+  data_null=data_null;
+
   selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(m_directory_tree));
   if (gtk_tree_selection_get_selected(selection, &model, &iter)) {
     char tempstring[STRINGSIZE];
@@ -45,10 +78,52 @@
 			COL_POINTER, &data, -1);
     p = data;
     snprintf(tempstring, STRINGSIZE - 1, "%s %d bytes", filename, p->filesize);
-    gtk_label_set_text(information_label, tempstring);
+    gtk_label_set_text(GTK_LABEL(information_label), tempstring);
+  }
+}
+
+
+gboolean do_download = FALSE;
+
+void
+process_args(int argc, char * argv[])
+{
+  int c;
+
+  while (1) {
+    int option_index = 0;
+    static struct option long_options[] = {
+      {"download", 1, 0, 'd'},
+      {0, 0, 0, 0}
+    };
+
+    c = getopt_long (argc, argv, "d", long_options, &option_index);
+    if (c == -1) break;
+
+    switch (c) {
+      case 'd':
+	do_download = TRUE;
+        break;
+
+      case '?':
+        break;
+
+      default:
+        printf ("?? getopt returned character code 0%o ??\n", 
+c);
+    }
+  }
+
+  if (optind < argc) {
+    printf ("non-option ARGV-elements: ");
+    while (optind < argc) {
+      printf ("%s ", argv[optind++]);
+      printf ("\n");
+    }
   }
 }
 
+
 int
 main (int argc, char *argv[])
 {
@@ -57,7 +132,7 @@
   
   GtkWidget * vbox1, *hbox2, *hbox3, *hbox1, *hbox_progressbar, *hbox_tree, *hbox_label;
   GtkWidget* window;
-  GtkScrolledWindow* s_w;
+  GtkWidget* s_w;
   GtkTreeViewColumn *col;
   GtkCellRenderer *renderer;
   GtkObject* hadjustment, *vadjustment;
@@ -71,6 +146,24 @@
    * from the command line and are returned to the application. */
   gtk_init (&argc, &argv);
   toggle_camera_lcd_screen_is_on = TRUE;
+
+  // Handle the command line args
+  process_args(argc,argv);
+
+  if (do_download) {
+    int ret=1;
+
+    if (open_camcorder(NULL,NULL,NULL)) {
+      if (unlock_camcorder(NULL,NULL,NULL) &&
+          download_all_movies(NULL,NULL,NULL)) {
+        ret=0;
+      }
+      close_camcorder(NULL,NULL,NULL);
+    }
+
+    exit(ret);
+  }
+
     /* create a new window */
   main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   window = main_window;
@@ -116,7 +209,7 @@
 			       300);
 
   s_w = gtk_scrolled_window_new(hadjustment, vadjustment);
-  gtk_scrolled_window_set_policy (s_w,
+  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(s_w),
 				  GTK_POLICY_AUTOMATIC,
 				  GTK_POLICY_AUTOMATIC);
   //  gtk_container_set_height (GTK_TREE_VIEW (m_directory_tree), 300);
@@ -146,14 +239,14 @@
 
 
   m_ctl_progress = gtk_progress_bar_new();
-  gtk_progress_bar_set_fraction(m_ctl_progress, .5);
+  gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(m_ctl_progress), .5);
     /* Sets the border width of the window. */
     //gtk_container_set_border_width (GTK_CONTAINER (window), 10);
     /* Creates a new button with the label "Hello World". */
   button_open_camcorder = gtk_button_new_with_label ("Open Camcorder");
   button_unlock = gtk_button_new_with_label ("Unlock");
   button_close_camcorder = gtk_button_new_with_label ("Close Camcorder");
-  //  button_download_all_movies = gtk_button_new_with_label ("Download All Movies");
+  button_download_all_movies = gtk_button_new_with_label ("Download All Movies");
   button_download_last_movie = gtk_button_new_with_label ("Download Last Movie");
   button_delete_file = gtk_button_new_with_label ("Delete File");
   button_format_storage = gtk_button_new_with_label ("Format Storage");
@@ -170,8 +263,8 @@
 		      GTK_SIGNAL_FUNC(unlock_camcorder), NULL);
   gtk_signal_connect (GTK_OBJECT (button_close_camcorder), "clicked",
 		      GTK_SIGNAL_FUNC(close_camcorder), NULL);
-  //  gtk_signal_connect (GTK_OBJECT (button_download_all_movies), "clicked",
-  //	      GTK_SIGNAL_FUNC (download_all_movies), NULL);
+  gtk_signal_connect (GTK_OBJECT (button_download_all_movies), "clicked",
+  		      GTK_SIGNAL_FUNC (download_all_movies), NULL);
   gtk_signal_connect (GTK_OBJECT (button_download_last_movie), "clicked",
 		      GTK_SIGNAL_FUNC(download_last_movie), NULL);
   // g_signal_connect (G_OBJECT (button_upload_movie), "clicked",
@@ -205,7 +298,7 @@
   gtk_box_pack_start (GTK_BOX (hbox1), button_unlock, TRUE, TRUE, 0);
   gtk_box_pack_start (GTK_BOX (hbox1), button_close_camcorder, TRUE, TRUE, 0);
   gtk_box_pack_start (GTK_BOX (hbox1), button_powerdown_camcorder, TRUE, TRUE, 0);
-  //  gtk_box_pack_start (GTK_BOX (hbox2), button_download_all_movies, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (hbox2), button_download_all_movies, TRUE, TRUE, 0);
   gtk_box_pack_start (GTK_BOX (hbox2), button_download_last_movie, TRUE, TRUE, 0);
   gtk_box_pack_start (GTK_BOX (hbox2), button_delete_file, TRUE, TRUE, 0);
   gtk_box_pack_start (GTK_BOX (hbox3), button_format_storage, TRUE, TRUE, 0);
@@ -260,7 +353,7 @@
   gtk_widget_set_sensitive(button_open_camcorder, value);
   gtk_widget_set_sensitive(button_unlock, value);
   gtk_widget_set_sensitive(button_close_camcorder, value);
-  //  gtk_widget_set_sensitive(button_download_all_movies, value);
+  gtk_widget_set_sensitive(button_download_all_movies, value);
   gtk_widget_set_sensitive(button_download_last_movie, value);
   //  gtk_widget_set_sensitive(button_upload_movie, value);
   gtk_widget_set_sensitive(button_format_storage, value);
diff -uNr ops-for-linux-v0.7/ops-linux.h ops-for-linux-v0.7-kees/ops-linux.h
--- ops-for-linux-v0.7/ops-linux.h	2005-08-22 23:33:08.000000000 -0700
+++ ops-for-linux-v0.7-kees/ops-linux.h	2005-08-26 18:37:48.000000000 -0700
@@ -57,8 +57,11 @@
   *button_powerdown_camcorder;
 
 gboolean toggle_camera_lcd_screen_is_on;
-GtkWidget *m_ctl_progress;
-GtkTreeView* m_directory_tree;
+
+extern GtkWidget *m_ctl_progress;
+
+//GtkTreeView* m_directory_tree;
+GtkWidget* m_directory_tree;
 double m_progressbar_fraction;
 //GtkTreeModel* m_directory_model;
 
@@ -147,6 +150,13 @@
 			       GdkEvent *event,
 			       gpointer data);
 
+// update_directory_listing.c
+gboolean GetFileInfo(file_info* thisfileinfo, gboolean isfirstfile);
+
+// download_file.c
+gboolean DownloadFile(char* saveto, char* filename);
+
+
 gboolean format_camcorder_confirmed(GtkWidget *widget);
 gboolean send_monitor_command_confirmed(GtkWidget *widget);
 gboolean update_directory_listing (GtkWidget *widget,
diff -uNr ops-for-linux-v0.7/README ops-for-linux-v0.7-kees/README
--- ops-for-linux-v0.7/README	1969-12-31 16:00:00.000000000 -0800
+++ ops-for-linux-v0.7-kees/README	2005-08-26 18:42:49.000000000 -0700
@@ -0,0 +1,5 @@
+
+In GUI mode, click "Open Camcorder" then "Unlock" before doing anything else.
+
+To download all movies on the camcoder non-interactively, use the "-d" flag.
+
