Index: /main/trunk/greenstone2/bin/script/exportcol.pl
===================================================================
--- /main/trunk/greenstone2/bin/script/exportcol.pl	(revision 27757)
+++ /main/trunk/greenstone2/bin/script/exportcol.pl	(revision 27758)
@@ -36,4 +36,5 @@
 
 use util;
+use FileUtils;
 use parse2;
 use printusage;
@@ -55,5 +56,5 @@
 	'type' => "string",
 	# parsearg left "" as default
-	#'deft' => &util::filename_cat ($ENV{'GSDLHOME'}, "collect"),
+	#'deft' => &FileUtils::filenameConcatenate ($ENV{'GSDLHOME'}, "collect"),
 	'deft' => "",
 	'reqd' => "no",
@@ -105,5 +106,5 @@
 	# the default/fallback for collect directory if none is provided
 	# (no -collectdir option given) is the standard Greenstone collect directory
-	my $collectdir = &util::filename_cat ($ENV{'GSDLHOME'}, "collect");
+	my $collectdir = &FileUtils::filenameConcatenate ($ENV{'GSDLHOME'}, "collect");
 
     my $hashParsingResult = {};
@@ -162,5 +163,5 @@
     # first we do a quick check to see if the export coll function has been 
     # installed
-    my $gssetupexe = &util::filename_cat ($ENV{'GSDLHOME'}, "bin", "windows", "gssetup.exe"); 
+    my $gssetupexe = &FileUtils::filenameConcatenate ($ENV{'GSDLHOME'}, "bin", "windows", "gssetup.exe"); 
     if (!-e $gssetupexe) {
 	&gsprintf($out, "{exportcol.fail} {exportcol.export_coll_not_installed}\n");
@@ -171,11 +172,11 @@
     my @valid_coll_list = ();
     foreach my $c (@coll_list) {
-	my $colldir = &util::filename_cat ($collectdir, $c);
+	my $colldir = &FileUtils::filenameConcatenate ($collectdir, $c);
 	if (! -d $colldir) {
 	    &gsprintf($out, "{exportcol.coll_not_found}\n", $c, $colldir);
 	    next;
 	}
-	my $colindexdir = &util::filename_cat ($colldir, "index");
-	my $coletcdir = &util::filename_cat ($colldir, "etc");
+	my $colindexdir = &FileUtils::filenameConcatenate ($colldir, "index");
+	my $coletcdir = &FileUtils::filenameConcatenate ($colldir, "etc");
 	if ((!-d $colindexdir) || (!-d $coletcdir)) {
 	    &gsprintf($out, "{exportcol.coll_dirs_not_found}\n", $c);
@@ -195,6 +196,6 @@
 
     # create exported directory
-    my $topdir = &util::filename_cat ($ENV{'GSDLHOME'}, "tmp", $cddir);
-    &util::mk_all_dir ($topdir);
+    my $topdir = &FileUtils::filenameConcatenate ($ENV{'GSDLHOME'}, "tmp", $cddir);
+    &FileUtils::makeAllDirectories ($topdir);
     if (!-d $topdir) {
 	&gsprintf($out, "{exportcol.fail} {exportcol.couldnt_create_dir}\n", $topdir);
@@ -212,17 +213,17 @@
     } 
     else {
-	$gsdldir = &util::filename_cat ($topdir, "gsdl");
-	&util::mk_all_dir ($gsdldir);
-    }
-    
-    my $newcollectdir = &util::filename_cat ($gsdldir, "collect");
-    &util::mk_all_dir ($newcollectdir);
-    my $etcdir = &util::filename_cat ($gsdldir, "etc");
-    &util::mk_all_dir ($etcdir);
+	$gsdldir = &FileUtils::filenameConcatenate ($topdir, "gsdl");
+	&FileUtils::makeAllDirectories ($gsdldir);
+    }
+    
+    my $newcollectdir = &FileUtils::filenameConcatenate ($gsdldir, "collect");
+    &FileUtils::makeAllDirectories ($newcollectdir);
+    my $etcdir = &FileUtils::filenameConcatenate ($gsdldir, "etc");
+    &FileUtils::makeAllDirectories ($etcdir);
 
     #create the config files
     if (!$noinstall) {
 	# create the install.cfg file
-	my $installcfg = &util::filename_cat ($topdir, "install.cfg");
+	my $installcfg = &FileUtils::filenameConcatenate ($topdir, "install.cfg");
 	if (!open (INSTALLCFG, ">$installcfg")) {
 	    &gsprintf($out, "{exportcol.fail} {exportcol.couldnt_create_file}\n", $installcfg);
@@ -238,5 +239,5 @@
 	
 	# create the manifest.cfg file
-	my $manifestcfg = &util::filename_cat ($topdir, "manifest.cfg");
+	my $manifestcfg = &FileUtils::filenameConcatenate ($topdir, "manifest.cfg");
 	if (!open (MANIFESTCFG, ">$manifestcfg")) {
 	    &gsprintf($out, "{exportcol.fail} {exportcol.couldnt_create_file}\n", $manifestcfg);
@@ -260,5 +261,5 @@
 
     #create the autorun.inf file
-    my $autoruninf = &util::filename_cat ($topdir, "Autorun.inf");
+    my $autoruninf = &FileUtils::filenameConcatenate ($topdir, "Autorun.inf");
     if (!open (AUTORUNINF, ">$autoruninf")) {
 	&gsprintf($out, "{exportcol.fail} {exportcol.couldnt_create_file}\n", $autoruninf);
@@ -275,10 +276,10 @@
     
     # copy the necessary stuff from GSDLHOME
-    my $webdir = &util::filename_cat ($ENV{'GSDLHOME'}, "web");
-    my $macrosdir = &util::filename_cat ($ENV{'GSDLHOME'}, "macros");
-    my $mappingsdir = &util::filename_cat ($ENV{'GSDLHOME'}, "mappings");
-    my $maincfg = &util::filename_cat ($ENV{'GSDLHOME'}, "etc", "main.cfg");
-    my $serverexe = &util::filename_cat ($ENV{'GSDLHOME'}, "bin", "windows", "server.exe");
-    my $setupexe = &util::filename_cat ($ENV{'GSDLHOME'}, "bin", "windows", "Setup.exe");
+    my $webdir = &FileUtils::filenameConcatenate ($ENV{'GSDLHOME'}, "web");
+    my $macrosdir = &FileUtils::filenameConcatenate ($ENV{'GSDLHOME'}, "macros");
+    my $mappingsdir = &FileUtils::filenameConcatenate ($ENV{'GSDLHOME'}, "mappings");
+    my $maincfg = &FileUtils::filenameConcatenate ($ENV{'GSDLHOME'}, "etc", "main.cfg");
+    my $serverexe = &FileUtils::filenameConcatenate ($ENV{'GSDLHOME'}, "bin", "windows", "server.exe");
+    my $setupexe = &FileUtils::filenameConcatenate ($ENV{'GSDLHOME'}, "bin", "windows", "Setup.exe");
 
     if ((!-d $webdir) || (!-d $macrosdir) || (!-d $mappingsdir) || (!-e $maincfg) ||
@@ -295,22 +296,22 @@
     }
 
-    &util::cp_r_nosvn ($webdir, $gsdldir);
-    &util::cp_r_nosvn ($macrosdir, $gsdldir);
-    &util::cp_r_nosvn ($mappingsdir, $gsdldir);
-    &util::cp ($maincfg, $etcdir);
-    &util::cp ($serverexe, $gsdldir);
+    &FileUtils::copyFilesRecursiveNoSVN ($webdir, $gsdldir);
+    &FileUtils::copyFilesRecursiveNoSVN ($macrosdir, $gsdldir);
+    &FileUtils::copyFilesRecursiveNoSVN ($mappingsdir, $gsdldir);
+    &FileUtils::copyFiles ($maincfg, $etcdir);
+    &FileUtils::copyFiles ($serverexe, $gsdldir);
 
     if (!$noinstall) {
-	&util::cp ($gssetupexe, $topdir);
-	&util::cp ($setupexe, $topdir); # unused, since Setup.exe does not work on Win 7 64-bit
+	&FileUtils::copyFiles ($gssetupexe, $topdir);
+	&FileUtils::copyFiles ($setupexe, $topdir); # unused, since Setup.exe does not work on Win 7 64-bit
     }	
     
     # now change the home.dm macro file to a simple version
-    my $newmacrodir = &util::filename_cat ($gsdldir, "macros");
-    my $exporthome = &util::filename_cat ($newmacrodir, "exported_home.dm");
-    my $oldhome = &util::filename_cat ($newmacrodir, "home.dm");
+    my $newmacrodir = &FileUtils::filenameConcatenate ($gsdldir, "macros");
+    my $exporthome = &FileUtils::filenameConcatenate ($newmacrodir, "exported_home.dm");
+    my $oldhome = &FileUtils::filenameConcatenate ($newmacrodir, "home.dm");
     if (-e $exporthome) {
-	&util::rm($oldhome);
-	&util::mv($exporthome, $oldhome);
+	&FileUtils::removeFiles($oldhome);
+	&FileUtils::moveFiles($exporthome, $oldhome);
     }
 
@@ -318,13 +319,13 @@
     foreach my $c (@valid_coll_list) {
 	#old directories
-	my $colldir = &util::filename_cat ($collectdir, $c);
-	my $colindexdir = &util::filename_cat ($colldir, "index");
-	my $coletcdir = &util::filename_cat ($colldir, "etc");
-	my $colmacrosdir = &util::filename_cat ($colldir, "macros");
-	my $colimagesdir = &util::filename_cat ($colldir, "images");
-	my $colscriptdir = &util::filename_cat ($colldir, "script");
-	my $coljavadir = &util::filename_cat ($colldir, "java");
-	my $colstyledir = &util::filename_cat ($colldir, "style");
-	my $colflashdir = &util::filename_cat ($colldir, "flash");
+	my $colldir = &FileUtils::filenameConcatenate ($collectdir, $c);
+	my $colindexdir = &FileUtils::filenameConcatenate ($colldir, "index");
+	my $coletcdir = &FileUtils::filenameConcatenate ($colldir, "etc");
+	my $colmacrosdir = &FileUtils::filenameConcatenate ($colldir, "macros");
+	my $colimagesdir = &FileUtils::filenameConcatenate ($colldir, "images");
+	my $colscriptdir = &FileUtils::filenameConcatenate ($colldir, "script");
+	my $coljavadir = &FileUtils::filenameConcatenate ($colldir, "java");
+	my $colstyledir = &FileUtils::filenameConcatenate ($colldir, "style");
+	my $colflashdir = &FileUtils::filenameConcatenate ($colldir, "flash");
 
 	# new collection directory
@@ -332,19 +333,19 @@
 	my $new_c = $c;
 	$new_c =~ s/^.*[\/\\]//; # remove any folder info
-	my $newcoldir = &util::filename_cat ($newcollectdir, $new_c);
-
-	&util::mk_all_dir ($newcoldir);
-	&util::cp_r_nosvn ($colindexdir, $newcoldir);
-	&util::rename_ldb_or_bdb_file(&util::filename_cat ($newcoldir, "index", "text", $c));
-	&util::cp_r_nosvn ($coletcdir, $newcoldir);
-	&util::cp_r_nosvn ($colmacrosdir, $newcoldir) if (-e $colmacrosdir);
-	&util::cp_r_nosvn ($colimagesdir, $newcoldir) if (-e $colimagesdir);
-	&util::cp_r_nosvn ($colscriptdir, $newcoldir) if (-e $colscriptdir);
-	&util::cp_r_nosvn ($coljavadir, $newcoldir) if (-e $coljavadir);
-	&util::cp_r_nosvn ($colstyledir, $newcoldir) if (-e $colstyledir);
-	&util::cp_r_nosvn ($colflashdir, $newcoldir) if (-e $colflashdir);
+	my $newcoldir = &FileUtils::filenameConcatenate ($newcollectdir, $new_c);
+
+	&FileUtils::makeAllDirectories ($newcoldir);
+	&FileUtils::copyFilesRecursiveNoSVN ($colindexdir, $newcoldir);
+	&util::rename_ldb_or_bdb_file(&FileUtils::filenameConcatenate ($newcoldir, "index", "text", $c));
+	&FileUtils::copyFilesRecursiveNoSVN ($coletcdir, $newcoldir);
+	&FileUtils::copyFilesRecursiveNoSVN ($colmacrosdir, $newcoldir) if (-e $colmacrosdir);
+	&FileUtils::copyFilesRecursiveNoSVN ($colimagesdir, $newcoldir) if (-e $colimagesdir);
+	&FileUtils::copyFilesRecursiveNoSVN ($colscriptdir, $newcoldir) if (-e $colscriptdir);
+	&FileUtils::copyFilesRecursiveNoSVN ($coljavadir, $newcoldir) if (-e $coljavadir);
+	&FileUtils::copyFilesRecursiveNoSVN ($colstyledir, $newcoldir) if (-e $colstyledir);
+	&FileUtils::copyFilesRecursiveNoSVN ($colflashdir, $newcoldir) if (-e $colflashdir);
 
 	# now we need to check the collect.cfg file to make sure it's public
-	my $collectcfg = &util::filename_cat ($newcoldir, "etc", "collect.cfg");
+	my $collectcfg = &FileUtils::filenameConcatenate ($newcoldir, "etc", "collect.cfg");
 	open INFILE, "<$collectcfg";
 	open OUTFILE, ">$collectcfg.tmp";
@@ -364,5 +365,5 @@
 	close INFILE;
 	close OUTFILE;
-	&util::mv("$collectcfg.tmp", $collectcfg);
+	&FileUtils::moveFiles("$collectcfg.tmp", $collectcfg);
     }
     &gsprintf($out, "{exportcol.success}");
Index: /main/trunk/greenstone2/bin/script/pdfpstoimg.pl
===================================================================
--- /main/trunk/greenstone2/bin/script/pdfpstoimg.pl	(revision 27757)
+++ /main/trunk/greenstone2/bin/script/pdfpstoimg.pl	(revision 27758)
@@ -39,4 +39,5 @@
 use parsargv;
 use util;
+use FileUtils;
 use Cwd;
 use File::Basename;
@@ -74,5 +75,5 @@
     # test that the directories exist to create the output file, or
     # we should exit immediately. 
-    &util::mk_dir($output_filestem) if (!-e $output_filestem);
+    &FileUtils::makeDirectory($output_filestem) if (!-e $output_filestem);
 	    
     my @dir = split (/(\/|\\)/, $input_filename);
@@ -90,5 +91,5 @@
     $cmd = "\"".&util::get_perl_exec()."\" -S gs-magick.pl convert";
 
-    my $output_filename = &util::filename_cat($output_filestem, $input_basename);
+    my $output_filename = &FileUtils::filenameConcatenate($output_filestem, $input_basename);
     if ($convert_to eq "gif") {
 	$cmd .= " \"$input_filename\" \"$output_filename-%02d.$convert_to\"";
@@ -104,6 +105,6 @@
 	print STDERR "Convert error for $input_filename $!\n";
 	# leave these for gsConvert.pl...
-	#&util::rm("$output_filestem.text") if (-e "$output_filestem.text");
-	#&util::rm("$output_filestem.err") if (-e "$output_filestem.err");
+	#&FileUtils::removeFiles("$output_filestem.text") if (-e "$output_filestem.text");
+	#&FileUtils::removeFiles("$output_filestem.err") if (-e "$output_filestem.err");
 	return 1;
     } else {
Index: /main/trunk/greenstone2/perllib/FileUtils.pm
===================================================================
--- /main/trunk/greenstone2/perllib/FileUtils.pm	(revision 27757)
+++ /main/trunk/greenstone2/perllib/FileUtils.pm	(revision 27758)
@@ -279,5 +279,5 @@
       # make the new directory
       my ($filename) = $file =~ /([^\\\/]*)$/;
-      $dest = &filenameConcatnate($dest, $filename);
+      $dest = &filenameConcatenate($dest, $filename);
       my $store_umask = umask(0002);
       mkdir ($dest, 0777);
