Moving files from one PC to another PC?


I know this seems more of a general Linux question. However, I thought I would ask here as DietPI comes with a lot of software which might help better.

I have two computers, both running DietPi v8.5.1 and both on native hardware.

PC1 is my downloader which uses Sonarr and Radarr.
PC2 is my media PC which uses Emby.

At first, I set up a Cronjob to run every midnight and use SFTP to move the files over (both on local LAN). However, if a file isn’t completed, it will move it over anyway, and transmission isn’t happy about that!

I’m asking if DietPi has any more suitable software; I’m aware of Rsync. However, (I might be very wrong here) it will only sync the files. So I wish to move them off to free up space.


Transmission has an option in the config to run a script when a file is downloaded. You could use that to trigger the copy of a file.

or you specify the sftp command to move files over older a specific amount of days, like this example for a file copy.

find /path/to/files* -mtime +7 -exec cp {} /mnt/nas/ \;


The good news, I found a method that worked for me. I forgot that Sonarr and Radarr can be setup so once the download is completed it can be moved to another folder.

That’s what I have done and using this guide. I have made this:


spawn sftp dietpi@
expect “password:”
send “passwordgoeshere\n”
expect “sftp>”
send “cd /mnt/Media/Movies/\n”
expect “sftp>”
send “put -r /mnt/Data/movies/\n"
send “cd /mnt/Media/TV Shows\n”
expect “sftp>”
send "put -r /mnt/Data/tvshows/
send “exit\n”

Which works a treat! Now I just need to find a way to delete the files that are copied over (anyone have any ideas?)…
And yes, maybe not the best idea to store the password in a plaintext, but since it’s all LAN, I’m not the fussed in fairness.

is it not possible to include a rm command into this script`?

1 Like

I just wanted to say, that should be easiest when the audio player’s network drive can be mounted.

If I’m not mistaken there is also a flag in *arr programs to remove the files from the original location, respectively really move instead of copy them?

Another option might be to import them to the network drive of the player system in the first place? Download is anyway done to the download server by the downloader, so the import by *arr is really just a move, save to do to a network drive.