From: Alan J. Pippin Date: Fri, 18 Nov 2011 05:48:59 +0000 (-0700) Subject: Fixed bug in the way the suffix was being printed (added zero padding) X-Git-Url: http://git.pippins.net/embedvideo/.git/static/images/%7Blink_ppi%7D?a=commitdiff_plain;h=2ce0104bdcc993060f5726e31f0115cd32ec99cf;p=videoscripts%2F.git Fixed bug in the way the suffix was being printed (added zero padding) --- diff --git a/merge_videos_by_day b/merge_videos_by_day index b012c39..f8a5a9e 100755 --- a/merge_videos_by_day +++ b/merge_videos_by_day @@ -121,7 +121,7 @@ foreach $file (sort `$find_cmd`) { $newfile = $dstfile . "." . $video_suffix; if(-e "$newfile.$ext") { foreach $i ($video_suffix+1 .. '999') { - $newfile = $dstfile . "." . $i; + $newfile = $dstfile . "." . sprintf("%03d",$i); if(! -e "$newfile.$ext") { last; } } $dstfile = $newfile; diff --git a/organize_videos b/organize_videos index 754ac28..d0c7458 100755 --- a/organize_videos +++ b/organize_videos @@ -189,7 +189,7 @@ foreach $file (`$find_cmd`) { $newfile = $dstfile . "." . $video_suffix; if(-e "$newfile.$ext") { foreach $i ($video_suffix+1 .. '999') { - $newfile = $dstfile . "." . $i; + $newfile = $dstfile . "." . sprintf("%03d",$i);; if(! -e "$newfile.$ext") { last; } } $dstfile = $newfile;