Hello! (This is for the Windows version of FFS)
#### In my original post I mixed things up.####
##### (and I cannot change the topic's title anymore :-/ ) #####
I removed those parts and only kept the remaining, logical, neccessary parts. For anybody who read the original post, I wish you no more headaches! ;-)
#### let's go!####
If you want to run RealTimeSync from a Batch file (e.g. .cmd .bat) you might experience the "always open black dos/commandline window" which remains open until RealTimeSync is closed *(depending on your use case)*.
<s>As that is annoying, the FreeFileSync.chm (press F1) suggests using the HideConsole.vbs as a workaround. But I prefer "easier" solutions using just what the OS gives you, without additional .vbs / windows scripting host files.
</s>
Solution:
Use the following line in your batchfile to start RealTimeSync:
start "" "c:\Program Files\FreeFileSync\RealtimeSync.exe" "c:\Some really nice\filename.ffs_batch"
Of course, replace the pathnames and filenames to fit your use case.
Watch for those double quotes "" after start and before "c:\...". You can run *"any"* program with *start "" command ...* which would block the command line window likewise. The double quotes are neccessary, if the *command* contains spaces like " ".
That's it.
*Maybe I should have read the help file more precise, see 3rd post...*
<s>Maybe this solution gets approved by the community and the authors/maintainers to be added to the windows version's help file.
</s>
For an explanation look at http://stackoverflow.com/questions/17201507/how-to-use-the-start-command-in-a-batch-file
easy solution on running realtimesync.exe without "black DOS command line window" without VBS script!
- Posts: 2
- Joined: 14 Feb 2008
- Site Admin
- Posts: 7211
- Joined: 9 Dec 2007
The problem is not that starting RTS would result in a block console window, but instead a .cmd file started *from* RTS command line field results in a black console window. Putting a `start ""` there unfortunately does not suppress the console window.
- Posts: 2
- Joined: 14 Feb 2008
Hi Zenju,
thanks a lot for your answer! I made myself a fool, as I suggested a solution to a problem different of what I tried to solve.
The section of the help file that I misunderstood is:
>Note
When RealtimeSync executes a Windows batch file (bat or cmd) a black console window is shown [...]
Which I *"internally"* interpreted it as:
> When RealTimeSync is executed by a Windows batch file [...]
For the problem documented in the help file, I do not have a solution. The silly thing is: For the problem that I had, the suggested *"HideConsole.vbs"* was working. And then I figured out how *to solve my problem without the .vbs script* by using the *"start"* command.
So, my *"solution"* fits for everybody who wants to start *"any"* program from a batch/cmd file that would block the DOS box without. It's not totally useless, but just for another problem.
thanks a lot for your answer! I made myself a fool, as I suggested a solution to a problem different of what I tried to solve.
The section of the help file that I misunderstood is:
>Note
When RealtimeSync executes a Windows batch file (bat or cmd) a black console window is shown [...]
Which I *"internally"* interpreted it as:
> When RealTimeSync is executed by a Windows batch file [...]
For the problem documented in the help file, I do not have a solution. The silly thing is: For the problem that I had, the suggested *"HideConsole.vbs"* was working. And then I figured out how *to solve my problem without the .vbs script* by using the *"start"* command.
So, my *"solution"* fits for everybody who wants to start *"any"* program from a batch/cmd file that would block the DOS box without. It's not totally useless, but just for another problem.