close all
clear all

global temp_path;
global DecodedResults_path;
global QuickViewPlots_path;

temp_path = 'tmp/';
DecodedResults_path = 'DecodedResults/';
QuickViewPlots_path = 'QuickViewPlots/';

dpath = '134.89.12.189/media/USB_Drive/logs/';

%dpath = '/mbari/ProjectLibrary/707976 EPBuoyPrototypeAndTesting/Deployments/Fall2014/134.89.12.189/data/';
%results_path = '/mbari/ProjectLibrary/707976 EPBuoyPrototypeAndTesting/Deployments/Fall2014/DecodedResults/'
%ftp_path = '/mbari/FTP/pub/hamilton/';


  dataDirs = dir([dpath '2*']);
  for k = 1:length(dataDirs)
    if(dataDirs(k).isdir == 1)
       path = [dpath dataDirs(k).name '/'];
       files = dir([path '2*']);
       for i = 1:length(files)
         disp(['path = ' path '   files.name = ' files(i).name]);
         if(isempty(dir([path files(i).name '.gz'])))    %Process this file only if a .gz version doesn't exist
    	   UnZipFiles(path,files(i));
	   disp('done');
	 end

       end

    end
  end




