Trailing characters with --stats-one-line -P --stats

No I don’t have special characters like Chinese and Japanese, but I do have ~ and %.

I start my rclone command in 2 different ways:

One way is to double click on a cmd file with this in it (this script get the script filename and create a path for the log file in another folder):

@echo off

echo start CMD

set datetime=%DATE% %TIME%

REM get filename of cmd

set filename=%~n0

set new_filename=%filename:Real =%

 REM get grandparent folder

SET parent=%~dp0

FOR %%a IN ("%parent:~0,-1%") DO SET grandparent_folder=%%~dpa

REM create log filename from new_filename 

set grandparent_folder

if not exist "%grandparent_folder%log" mkdir "%grandparent_folder%log"

set logpath= "%grandparent_folder%log\%new_filename%.log

@echo on

rclone sync “local folder” “remote name”:“remote folder” --log-file %logpath%" --log-level INFO --delete-after --copy-links --stats-one-line -P --stats 5s

python "format_log_rclone.py" "%logpath%" "%datetime%" 

Note that it is normal that there is only a single " after %logpath% (and none before).

The second way is to start a python script with a GUI that let me choose with cmd I want (I have several cmd like the one above for different remotes/Google drive). The cmd is called with subprocess.call([cmd_path]).

I have the trailing characters for both even though the first one is running in a cmd console and the second one in a python console.

Note that the trailing characters don’t bother me, but it may bother or confuse new users.

I am trying in powershell and will let you know