|
@@ -0,0 +1,68 @@
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+function ts() {
|
|
|
+ return $(date)
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+echo "Source [$(pwd)]:"
|
|
|
+read src
|
|
|
+if [ ${src} != "" ]l then
|
|
|
+ src = "$(pwd)"
|
|
|
+fi
|
|
|
+
|
|
|
+
|
|
|
+echo "Destination [$(pwd)]:"
|
|
|
+read dst
|
|
|
+if [ ${dst} != "" ]l then
|
|
|
+ dst = "$(pwd)"
|
|
|
+fi
|
|
|
+
|
|
|
+
|
|
|
+if [ ${src} -eq ${dst} ]; then
|
|
|
+ echo "[$ts] Source and destination are the same, exiting..."
|
|
|
+ exit 2
|
|
|
+fi
|
|
|
+
|
|
|
+
|
|
|
+echo "Description of session/event:"
|
|
|
+read desc
|
|
|
+if [ ${desc} != "" ]l then
|
|
|
+
|
|
|
+ desc = " - ${desc}"
|
|
|
+fi
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ dst_subdir="${dst}/${file_creation_date}${desc}"
|
|
|
+
|
|
|
+ file_new_name="$(read creation date and time, format)-${file}"
|
|
|
+
|
|
|
+ echo "[ $(ts()) ] src: [${src}/${file], dst: [${dst_subdir}/${file_new_name}]"
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ mv -v ${src}/${file} ${dst_subdir}/${file_new_name}
|
|
|
+
|
|
|
+
|