Jump to content

shb_php

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

shb_php's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. --regextrans2 "s/^INBOX\.Sent Items/INBOX\.Sent/i" ^ Thanks heaps... that works I did like your explanation.. But I still don't understand what the: (.+) and the $1 are actually doing ?????
  2. The first one ? But I do need it to rename all sub folders of "Sent Items" as well at that folder. Can you please show the full line ?
  3. Thats great ! thx .. that brings it down to two lines.. How to consolidate it further, to a single line ?? --regextrans2 "s/^INBOX\.Sent Items$/INBOX\.Sent/i" ^ --regextrans2 "s/^INBOX\.Sent Items\.(.+)/INBOX\.Sent\.$1/i" ^ I could only get it to work like that - the first line handles "Sent Items" and the second one handles any sub folders under "Sent Items". But neither line did both no matter how I tweaked them... but, clearly, I'm not a regex or perl person. Any thoughts ?
  4. It does it through the parameters passed to it at execution time. The particular option that contains the text I posted is --regextrans2. It is the option that reworks the name of the destination folder eg "Sent Items" to "Sent" or "Inbox.Inbox" to "Inbox" etc.. So to run imapsynch the command may look like this: imapsync ^ --host1 mail.xxxx.com --user1 ergo --password1 ergo ^ --host2 mail911.x.com --user2 erg0 --password2 newpw ^ --regextrans2 "s/^INBOX\.INBOX\.(.+)/INBOX\.$1/" ^ --regextrans2 "s#^INBOX\.sent items$#INBOX\.Sent#" ^ --regextrans2 "s#^INBOX\.Sent Items$#INBOX\.Sent#" ^ --regextrans2 "s/^INBOX\.sent items\.(.+)/INBOX\.Sent\.$1/" ^ --regextrans2 "s/^INBOX\.Sent Items\.(.+)/INBOX\.Sent\.$1/" ^ --exclude Deleted ^ --exclude Trash ^ --exclude Junk ^
  5. Ok.. I'm using a tool called imapsync. It copies email accounts from one place to another. IT allows some remapping of folder names... if you know a bit of regex. I did get it to work ( but completely UGLY code). In fact embarrassing... Anyone who knows regex please help me.. I ended up using 4 statements (instead of one). "s#^INBOX\.sent items$#INBOX\.Sent#" "s#^INBOX\.Sent Items$#INBOX\.Sent#" "s/^INBOX\.sent items\.(.+)/INBOX\.Sent\.$1/" "s/^INBOX\.Sent Items\.(.+)/INBOX\.Sent\.$1/" I am just trying to rename "Sent Items" and all its children to "Sent". First problem is case insensitivity... Something like "/i".. but where exactly ?. And the second bigger problem is the bottom statement does for all the children folders, and the top statement does it for just the "Sent Items" folder itself.. PLEASE HELP... I know its embarrassing, but I actualy been working on this (should be) one line for 24 hours straight and its sending me to the nut house. Just can't get it to work - elegantly (ie. in one line) S
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.