Skip to content

A small program to one-way-syncing. It tries to fit as many files from one folder in another, priorizing new files. This is useful for podcasts for example.

License

Notifications You must be signed in to change notification settings

MRudolph/freshsync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

freshsync

This is a small program to one-way-syncing. It copies files from one directory to another,handling the problem of limited disk space on the target. This is useful for transferring podcasts on a mp3-player.

Warning: This means automatic deletion of files without asking for a confirmation. Don't use this for critical data.

While doing this, it handles the problem of limited diskspace in the target by following this rules:

  • If there is space on the drive left, this will be used first
  • If there isn't enough space for everything, only the newest files will be in the target directory
  • To free space, the oldest files in the target will be deleted
  • If they are too old, even files only in the target will be deleted, too
  • Everything is handled on a file by file basis, so directories can be copied partially

Running with scala

This is a standalone script. Having scala installed you can run it via

freshsync <dir1> <dir2>

or, if shebangs don't work on your system

scala freshsync <dir1> <dir2>

to copy files from dir1 to dir2. It will print out a detailled report on which files were present and what was done with each one.

Running with java

I'm still looking for an easy way to bundle this up without the use of special build-tools, as this software has no dependencies except the scala runtime. Pull requests welcome.

About

A small program to one-way-syncing. It tries to fit as many files from one folder in another, priorizing new files. This is useful for podcasts for example.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages