I don't use WinRar so the command line may have to be fixed. I just gleaned it from eleman's post.
Script should be self-explanatory. You should enter the path as well as filename or the script will start searching in the working directory. For example, to search all folders on C: for readme.txt use C:\readme.txt as the command line arg.
edit: if no file specified on command line, Input Box asks for the file name. As noted above, the path in the file name with be the start of the folder search. Otherwise it will start in the folder where the script is.
Not tested as I don't have rar.exe installed
; run with filename on command line
; whatever the starting directory of the filename, it will recursively dig into all folders beneath
if 0 < 1
InputBox,FilePat,,Enter File Name (e.g. C:\readme.txt)
FilePat = %1%
tmp := _FilePathNoExt(A_LoopFileLongPath) . ".rar"
RunWait,rar m -x*.rar -m5 %tmp% %A_LoopFileLongPath%
; --------- path manipulation functions - file doos not need to exist, but passing path="" tends to mess them up ----
return _FileDirWithSlash(path) . _FileBaseName(path)
return _FileDir(path) . "\"