1
0
mirror of https://github.com/imapsync/imapsync.git synced 2024-11-17 00:02:29 +01:00
imapsync/examples/imapsync_example.bat

69 lines
3.1 KiB
Batchfile
Raw Normal View History

2022-06-01 17:47:18 +02:00
@REM $Id: imapsync_example.bat,v 1.12 2022/02/12 11:00:09 gilles Exp gilles $
2012-04-17 00:31:15 +02:00
2022-06-01 17:47:18 +02:00
@REM Here is an imapsync example batch for Windows users.
@REM Lines beginning with @REM are just comments.
@REM Please read the comments, they are written for you, human folk.
2012-04-17 00:31:15 +02:00
2021-08-04 21:14:36 +02:00
@REM Read also https://imapsync.lamiral.info/README_Windows.txt
@REM for more details on how to use imapsync on Windows.
2016-01-22 17:52:28 +01:00
2022-06-01 17:47:18 +02:00
@REM Now let us enter the real work to fit your needs.
@REM Replace below the 6 parameters
2015-05-28 19:04:57 +02:00
@REM "test1.lamiral.info" "test1" "secret1" "test2.lamiral.info" "test2" "secret2"
2022-06-01 17:47:18 +02:00
@REM with your values.
@REM Double quotes are necessary if a value contains one or more blanks.
2012-04-17 00:31:15 +02:00
2022-06-01 17:47:18 +02:00
@REM Value "test1.lamiral.info" for --host1 is the IMAP source server hostname or IP address.
@REM Value "test1" for --user1 is the IMAP source user login.
@REM Value "secret1" for --password1 is the IMAP source user password.
2015-05-28 19:04:57 +02:00
2022-06-01 17:47:18 +02:00
@REM Value "test2.lamiral.info" for --host2 is the IMAP destination server hostname or IP address.
@REM Value "test2" for --user2 is the IMAP destination user login.
@REM Value "secret2" for --password2 is the IMAP destination user password.
2015-05-28 19:04:57 +02:00
@REM Character ^ at the end of the first line is essential and means
@REM "this command continues on the next line". You can add other lines
@REM but don't forget ^ character lasting each line, except the last one.
2022-06-01 17:47:18 +02:00
@REM Also, there must be no other character after each lasting character ^
@REM not even a blank invisible character, or you'll end up with an
@REM error "Unknown command" with what you added.
2015-05-28 19:04:57 +02:00
2021-08-04 21:14:36 +02:00
@REM That is not all, keep on reading!
2016-01-22 17:52:28 +01:00
@REM Three other options are in this example because they are good to start with
@REM
@REM --dry makes imapsync doing nothing, just print what would be done without --dry.
2022-06-01 17:47:18 +02:00
@REM So, if you keep --dry then imapsync will not sync your data.
2021-08-04 21:14:36 +02:00
@REM --justfolders does only folders creations, it ignores messages.
@REM This option is good to verify the folder mapping is good for you
@REM without starting to copy/pollute folders with messages.
2016-01-22 17:52:28 +01:00
@REM
2022-06-01 17:47:18 +02:00
@REM --automap guesses folders mapping, it works for folders like
@REM "Sent", "Junk", "Drafts", "All", "Archive", "Flagged".
2016-01-22 17:52:28 +01:00
@REM
2021-08-04 21:14:36 +02:00
@REM I suggest/impose to start with --automap --justfolders --dry.
@REM If the folder mapping you see in the output is not good then add
@REM some options --f1f2 "folder1=folder2"
2022-06-01 17:47:18 +02:00
@REM to fix the mapping.
2021-08-04 21:14:36 +02:00
@REM Once you are happy with the folder names on the destination,
@REM remove --dry and have a run to create folders on host2.
2016-01-22 17:52:28 +01:00
@REM If everything goes well so far then remove --justfolders to
@REM start syncing messages.
2021-08-04 21:14:36 +02:00
@REM In case you are impatient, just remove --justfolders --dry
@REM in the firt place and go. Imapsync is not that bad by default anyway!
2016-01-22 17:52:28 +01:00
2021-08-04 21:14:36 +02:00
.\imapsync.exe --host1 "test1.lamiral.info" --user1 "test1" --password1 "secret1" ^
--host2 "test2.lamiral.info" --user2 "test2" --password2 "secret2" ^
--automap --justfolders --dry
2012-04-17 00:31:15 +02:00
2021-08-04 21:14:36 +02:00
@ECHO The sync is over.
@ECHO Hit any key to close this window
@ECHO the following word "to continue" means in fact "to close this window"
2014-05-30 03:56:21 +02:00
@PAUSE
2013-04-22 21:50:50 +02:00