Page 1 of 1
Insert at begin line
Posted: Mon Nov 21, 2011 12:06 am
by kpad2011
I have:
555KQN001_A.pdf
555KQN001_B.pdf
555KQN002_A.pdf
555KQN002_B.pdf
555KQN003_B.pdf
become:
E:\ZTemp\003\555KQN001_A.pdf
E:\ZTemp\004\555KQN001_B.pdf
E:\ZTemp\003\555KQN002_A.pdf
E:\ZTemp\004\555KQN002_B.pdf
E:\ZTemp\004\555KQN003_B.pdf
Thank you
Posted: Mon Nov 21, 2011 2:50 am
by ak47wong
I'm going to assume that filenames that end in "A" go in the 003 directory and those that end in "B" go in 004. If that's not the case you'll need to state what the rule is.
Call the Replace command twice:
First Replace operation:
Find what: .*A\.pdf
Replace with: E:\\ZTemp\\003\\&
Select Regular expression
Click Replace All
Second Replace operation:
Find what: .*B\.pdf
Replace with: E:\\ZTemp\\004\\&
Select Regular expression
Click Replace All
Posted: Mon Nov 21, 2011 6:42 am
by kpad2011
Work good
Thank You very much
Simple request
Posted: Sat Nov 26, 2011 12:24 am
by 09RKC
ak47wong,
I hope you can help with a question along the same line. I have several txt files that list names, up to 4000 names in each file. I've been importing the txt files and the names diaplay nicely.
All I want to do is be able to add a letter(s) to the front or back of the line. For instance, the name "Best Breakfast" (no quotes)... I'd like the results to be "zBest Breakfast" for this line and the remaining 3999 lines.
Is there a way to do this other than one at a time? I can rename files all day long but have zero experience with txt editors, augments, strings etc.
Please list specific, step 1, step 2, step 3 directions. Assume nothing

, I really don't know what I'm doing in this area!
Tkx so much!
Doug
Posted: Sun Nov 27, 2011 11:42 am
by ak47wong
If you want to add the letter z to the start of each line in a file:
1. Click Search > Replace.
2. In Find what, type ^
3. In Replace with, type z
4. Select Regular expression.
5. Click Replace All.
If you want to add the letter z to the end of each line in a file:
1. Click Search > Replace.
2. In Find what, type $
3. In Replace with, type z
4. Select Regular expression.
5. Click Replace All.
Posted: Sun Nov 27, 2011 2:02 pm
by 09RKC
How did you learn all this stuff?! Is this buried in Help somewhere? Makes me wonder what else I can be doing with a simple entry and a click.
I *REALLY* appreciate your help. If I don't talk to you beforehand, Merry Christmas!
Doug
Posted: Sun Nov 27, 2011 10:45 pm
by ak47wong
I learned this stuff many years ago when doing development on UNIX systems, but if you're interested in learning more, refer to
this post by ben_josephs (who is
the expert on regular expressions in these parts).
Merry Christmas!
