Skip to content

alpden550/go-sync-dirs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Sync

Simple sync files realization with goroutines between two directories.

How to prepare

To create exec file, type make command

make build

How start

To see available command arguments:

./gosync -help
Usage of ./gosync:
  -initial string
        Initial directory
  -interval int
        Interval in minutes between checking initial directory (default 5)
  -target string
        Target directory to copy files from initial

To start sync initial folder:

make build

and

./gosync -initial=/Users/username/Desktop/first-directory -target=/Users/username/Desktop/target -interval=10

or

go run cmd/app/main.go -initial=/Users/username/Desktop/first-directory -target=/Users/username/Desktop/target -interval=10