My script to rename tacitpart file :
#!/bin/bash # ARIAS Frederic # # For MAC OS do # suffix=".tacitpart" path="WebDAV" for file in $path/*.tacitpart do if [[ -f $file ]]; then filenew=$(basename $file $suffix) echo $file" -> "$filenew mv $file $path/$filenew touch $path/$filenew fi done # for file in $path/.resource/*.tacitpart do if [[ -f $file ]]; then $filenew = ${file/%$suffix} echo $file." -> ".$filenew mv $file $path/.resource/$filenew touch $path/.resource/$filenew fi done