Lines Matching refs:folder
40 * copier will copy a specified number of messages from one folder
41 * to another folder. it demonstrates how to use the JavaMail APIs
45 * <i>src folder</i> <i>dest folder</i> <i>start msg #</i> <i>end msg #</i><p>
55 System.out.println( "usage: copier <urlname> <src folder>" +
56 "<dest folder> <start msg #> <end msg #>");
62 String src = argv[1]; // source folder
63 String dest = argv[2]; // dest folder
78 Folder folder = store.getFolder(src);
79 folder.open(Folder.READ_WRITE);
82 if (folder.getMessageCount() == 0) {
83 System.out.println("Source folder has no messages ..");
84 folder.close(false);
88 // Open destination folder, create if needed
93 Message[] msgs = folder.getMessages(start, end);
97 folder.copyMessages(msgs, dfolder);
100 // Close the folder and store
101 folder.close(false);
103 System.out.println("Closed folder and store...");