1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- 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}
-
-
|