This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re[2]: add folder name to filename
hi Nikolaos
NAP> Fixed :
NAP> added a space after "folder":
NAP> for file in folder */*; do
^^^^^^
NAP> echo folder */*
NAP> dir=$(basename "$(dirname "$file")")
NAP> base=$(basename "$file")
NAP> mv "$file" "$(dirname "$file")/${dir}_${base}"
NAP> done
"Script started, file is typescript" -- "file" - reserved word
hint: man file
--
Regards,
oleyk mailto:oleyk@mail.ru
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/