JOPLIN : Script to rename tacitpart file

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

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Time limit is exhausted. Please reload CAPTCHA.