Not sure if it was previously requested.
.... but using FFS mainly as a batch, kicked up by TaskSched....
I would really appreciate to have this feature, instead of having to remember to check every day my logs.
Thanks
Alain
Feature Request: When finished: Show Log
- Posts: 26
- Joined: 29 May 2019
- Attachments
-
- 2020-07-20 11 58 11.jpg (37.05 KiB) Viewed 2289 times
- Posts: 1037
- Joined: 8 May 2006
Create a couple batch files that run SHUTDOWN.EXE (with appropriate parameters) ?
Call one, Sleep.bat.
The other, Shut down.bat.
(I'm not sure if Shutdown offers a sleep option?)
Oh, you're wanting, Show Log.
(I'm not thinking right but) something like...
showlog.bat:
Call one, Sleep.bat.
The other, Shut down.bat.
(I'm not sure if Shutdown offers a sleep option?)
Oh, you're wanting, Show Log.
(I'm not thinking right but) something like...
showlog.bat:
cat `dir /od- /b [path-to-log-directory] | head -1`
- Posts: 26
- Joined: 29 May 2019
Thanks !!!
not clear how to "call" the bat file...
I'll try and report back
Alain
not clear how to "call" the bat file...
I'll try and report back
Alain
- Posts: 22
- Joined: 20 Jul 2020
The FFS help file has some info on calling batch files.
- Posts: 26
- Joined: 29 May 2019
My FFS.Batch file is run by taskmanager.The FFS help file has some info on calling batch files. toby9999, 23 Jul 2020, 05:04
.
... no idea how to run your command...
and if it's in a .bat file,
how to chain it at the end of FF.batch in taskmanager.
Alain
- Posts: 22
- Joined: 20 Jul 2020
So, are you trying to run a batch file (to show the FFS log file) after the FFS batch runs?
1) Tasksched -> FreeFileSync.exe "yourScript.ffs_batch"
2) Make sure yourScript.ffs_batch contains a completion job...
eg <PostSyncCommand Condition="Completion">"C:\LogHandler.bat"</PostSyncCommand>
3) The LogHandler batch file will run and do whatever you want after each successful completion of yourScript.ffs_batch
Is that what you're trying to do, or something different?
1) Tasksched -> FreeFileSync.exe "yourScript.ffs_batch"
2) Make sure yourScript.ffs_batch contains a completion job...
eg <PostSyncCommand Condition="Completion">"C:\LogHandler.bat"</PostSyncCommand>
3) The LogHandler batch file will run and do whatever you want after each successful completion of yourScript.ffs_batch
Is that what you're trying to do, or something different?
- Posts: 26
- Joined: 29 May 2019
Perfect!!
A) New/Edit PostLog.bat
Add one line = "cat `dir /od- /b [......\...\F8-log-directory] | head -1`"
B) edit the FFS.batch:
Add one line = "PostSyncCommand Condition="Completion">"...\PostLog.bat"
Nothing else to change.
Correct??
Many Thanks
Alain
PS: all this is on the root of a USB Key stuck in the back,
as a permanent backup for my Thunderbird mail,
and it will run three times a day
A) New/Edit PostLog.bat
Add one line = "cat `dir /od- /b [......\...\F8-log-directory] | head -1`"
B) edit the FFS.batch:
Add one line = "PostSyncCommand Condition="Completion">"...\PostLog.bat"
Nothing else to change.
Correct??
Many Thanks
Alain
PS: all this is on the root of a USB Key stuck in the back,
as a permanent backup for my Thunderbird mail,
and it will run three times a day
- Attachments
-
- 2020-07-23 13 50 39.jpg (12.28 KiB) Viewed 2051 times
-
- 2020-07-23 13 45 26.jpg (74.34 KiB) Viewed 2052 times
-
- 2020-07-23 13 47 00.jpg (26.08 KiB) Viewed 2052 times
- Posts: 22
- Joined: 20 Jul 2020
Looks good, but don't forget to add </PostSyncCommand> at the end of the PostSyncCommand line.
- Posts: 26
- Joined: 29 May 2019
oooh...
forgot that
thanks!!
Alain
forgot that
thanks!!
Alain
- Attachments
-
- 2020-07-23 14 10 03.jpg (52.67 KiB) Viewed 2045 times
- Posts: 2450
- Joined: 22 Aug 2012
For correct XML, your line should read:
possibly providing the correct path to Postlog.bat.
For convenience you may consider to use the FFS GUI instead of a text editor.
If in the Sync Settings (F8) you define the correct command line (e.g. Postlog.bat), and then save the FFS configuration (as a *.ffs_gui or *.ffs_batch file), FFS willl do the work for you and generate the correct XML code.
<PostSyncCommand Condition="Completion">Postlog.bat</PostSyncCommand>
For convenience you may consider to use the FFS GUI instead of a text editor.
If in the Sync Settings (F8) you define the correct command line (e.g. Postlog.bat), and then save the FFS configuration (as a *.ffs_gui or *.ffs_batch file), FFS willl do the work for you and generate the correct XML code.
- Posts: 26
- Joined: 29 May 2019
Oh Wow your are so kind !!
So I deleted the line. Saved FFS.Batch file
did "FFS edit" F8 ... then saved it
opened with notepad an LO!
My problem is solved!!!!!
a big thanks
(unless I did something wrong into the PostLog.bat file)
So I deleted the line. Saved FFS.Batch file
did "FFS edit" F8 ... then saved it
opened with notepad an LO!
My problem is solved!!!!!
a big thanks
(unless I did something wrong into the PostLog.bat file)
- Attachments
-
- 2020-07-23 16 39 51.jpg (208.86 KiB) Viewed 2023 times
- Posts: 1037
- Joined: 8 May 2006
I'm on Windows, & when I said "like", I meant like ;-).(I'm not thinking right but) something like...
As in what I wrote was a mixture of DOS & Unix commands (& syntax's).
So the PostLog.bat that you came up with actually does work?
And just what command line are you using in there?
- Posts: 26
- Joined: 29 May 2019
ooops
I took it literally
and thinking back I've never seen the log appearing :-D
No, that .bat string doesn't work.
:-D
Alain
I took it literally
and thinking back I've never seen the log appearing :-D
No, that .bat string doesn't work.
:-D
Alain
- Posts: 26
- Joined: 29 May 2019
Any help on the PostLog.bat will be gratefully received !!!
Alain
Alain
- Posts: 1037
- Joined: 8 May 2006
(For Windows.)
Try this, adjusting as needed.
PostLog.bat:
Set your directory to wherever you have your FFS logs directory set to.
LASTLOG will store the full path+name of the last file name (so presumably the newest) as generated by a dir /b file listing, as found in your log directory.
(After the pause) notepad.exe will open the log file.
(Change notepad.exe to whatever you want; vim.exe, less.exe, showtx.exe ...)
Beware of diacritics in your (log) filename because not all utilities will handle diacritics correctly (like Ú vs U).
(You can run PostLog.bat directly to see what it can do, if it's working correctly - so no need, necessarily, to run FFS first.)
Try this, adjusting as needed.
PostLog.bat:
for /f "delims=|" %%i in ('dir /b C:\LOGS\FFS_LOGS\') do set LASTLOG=%%~fi
echo The last log is: %LASTLOG%
pause
notepad.exe "%LASTLOG%"
LASTLOG will store the full path+name of the last file name (so presumably the newest) as generated by a dir /b file listing, as found in your log directory.
(After the pause) notepad.exe will open the log file.
(Change notepad.exe to whatever you want; vim.exe, less.exe, showtx.exe ...)
Beware of diacritics in your (log) filename because not all utilities will handle diacritics correctly (like Ú vs U).
(You can run PostLog.bat directly to see what it can do, if it's working correctly - so no need, necessarily, to run FFS first.)
- Posts: 26
- Joined: 29 May 2019
ok thanks
I'll change the Log dir and that's all I suppose.
everything is under K: root ... and K is a portable USB stick.
in pic 2 the results
Many thanks
Alain
I'll change the Log dir and that's all I suppose.
everything is under K: root ... and K is a portable USB stick.
in pic 2 the results
Many thanks
Alain
- Attachments
-
- 2020-07-26 23 52 49.jpg (146.74 KiB) Viewed 1794 times
-
- 2020-07-26 23 49 10.jpg (99.65 KiB) Viewed 1796 times
- Posts: 1037
- Joined: 8 May 2006
(I made some slight changes to PostLog.bat, above.)
In your case, you may want to change it again, something like, ('dir /b k:\nis*.html'')
(As it is, for you, it is finding "NIS-BKP 2", which would be the wrong file.)
In your case, you may want to change it again, something like, ('dir /b k:\nis*.html'')
(As it is, for you, it is finding "NIS-BKP 2", which would be the wrong file.)
- Posts: 26
- Joined: 29 May 2019
here's the new run.
with error after pause
Thanks
with error after pause
Thanks
- Attachments
-
- 2020-07-27 00 00 43.jpg (85.05 KiB) Viewed 1790 times
-
- 2020-07-26 23 59 24.jpg (257.36 KiB) Viewed 1792 times
- Posts: 1037
- Joined: 8 May 2006
In your case, you may want to change it again, something like, ('dir /b k:\nis*.html'')
(As it is, for you, it is finding "NIS-BKP 2", which would be the wrong file [directory].)
When correct it should presumably display *194512*.html.
(Heh. But then, notepad won't help too much with .html, so maybe you'll want something like:
edge.exe "%LASTLOG%")
(As it is, for you, it is finding "NIS-BKP 2", which would be the wrong file [directory].)
When correct it should presumably display *194512*.html.
(Heh. But then, notepad won't help too much with .html, so maybe you'll want something like:
edge.exe "%LASTLOG%")
- Posts: 26
- Joined: 29 May 2019
correct.
doing
Success !!!
a Great thanks !!
doing
Success !!!
a Great thanks !!
- Attachments
-
- 2020-07-27 00 06 55.jpg (316.7 KiB) Viewed 1787 times
- Posts: 26
- Joined: 29 May 2019
better this way
it's an HTML it open in browser directly
You are Wonderfull !
Alain
it's an HTML it open in browser directly
You are Wonderfull !
Alain
- Attachments
-
- 2020-07-27 00 13 17.jpg (139.17 KiB) Viewed 1783 times