@@ -78,6 +78,7 @@ func Run() (err error) {
7878 & cli.IntFlag {Name : "port" , Value : 9009 , Usage : "base port for the relay" },
7979 & cli.IntFlag {Name : "transfers" , Value : 4 , Usage : "number of ports to use for transfers" },
8080 & cli.BoolFlag {Name : "qrcode" , Aliases : []string {"qr" }, Usage : "show receive code as a qrcode" },
81+ & cli.StringFlag {Name : "exclude" , Value : "" , Usage : "exclude files if they contain any of the comma separated strings" },
8182 },
8283 HelpName : "croc send" ,
8384 Action : send ,
@@ -274,6 +275,13 @@ func send(c *cli.Context) (err error) {
274275 if transfersParam == 0 {
275276 transfersParam = 4
276277 }
278+ excludeStrings := []string {}
279+ for _ , v := range strings .Split (c .String ("exclude" ), "," ) {
280+ v = strings .ToLower (strings .TrimSpace (v ))
281+ if v != "" {
282+ excludeStrings = append (excludeStrings , v )
283+ }
284+ }
277285
278286 ports := make ([]string , transfersParam + 1 )
279287 for i := 0 ; i <= transfersParam ; i ++ {
@@ -305,6 +313,7 @@ func send(c *cli.Context) (err error) {
305313 GitIgnore : c .Bool ("git" ),
306314 ShowQrCode : c .Bool ("qrcode" ),
307315 MulticastAddress : c .String ("multicast" ),
316+ Exclude : excludeStrings ,
308317 }
309318 if crocOptions .RelayAddress != models .DEFAULT_RELAY {
310319 crocOptions .RelayAddress6 = ""
@@ -418,7 +427,7 @@ Or you can go back to the classic croc behavior by enabling classic mode:
418427 // generate code phrase
419428 crocOptions .SharedSecret = utils .GetRandomName ()
420429 }
421- minimalFileInfos , emptyFoldersToTransfer , totalNumberFolders , err := croc .GetFilesInfo (fnames , crocOptions .ZipFolder , crocOptions .GitIgnore )
430+ minimalFileInfos , emptyFoldersToTransfer , totalNumberFolders , err := croc .GetFilesInfo (fnames , crocOptions .ZipFolder , crocOptions .GitIgnore , crocOptions . Exclude )
422431 if err != nil {
423432 return
424433 }
0 commit comments