Good to share! If you work on Windows the below batch file can be used to 
create
backups from you Tiddlywiki files using robocopy!

save this is .bat or .cmd file like mybackup.cmd
set the source and destination folder and it works!

I used for example 

source=G:\TW\TW-Yazd
dest =G:\TW\MyArchive\TW-Yazd 


@echo off
cls

:: Set Source folder, from which you copy files/folders
set source=G:\TW\TW-Yazd
:: Set Destination folder, from which you copy files/folders
set dest=G:\TW\MyArchive\TW-Yazd
:: Set Archive folder (keeps zipped files) 
set archive=%dest%\backups

:: Sets specific copy instructions
:: See readme for more details
SET what=/COPY:DT /E


:: See readme for more details
:: Log file specifications
SET _options=/LOG:%dest%\backup.log


:: Generate a yyyy.mm.dd-hh.mm.ss extension
set 
_dateExt=%date:~-4,4%.%date:~-7,2%.%date:~-10,2%-%time:~0,2%.%time:~3,2%.%time:~6,2%
:: add leading zeros
set _dateExt=%_dateExt: =0%

:: Starts ROBOCOPY
ROBOCOPY "%source%" "%dest%\%_dateExt%" %what% %_options%

:: zips up the backup folder
"C:\Program Files\7-Zip\7z.exe" a -t7z  "%archive%\%_dateExt%.7z" 
"%source%\*" -r > null

::REF
:: 
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy


You can turn off zip or plane backup or keep both of them as I used above!
Note: for zip, it uses 7zip if you have other programs replace the below 
line
"C:\Program Files\7-Zip\7z.exe"


--Mohammad

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/104c34b2-0088-42f1-8caf-26dc5f873775%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to