Page 1 of 1
Finding and Sorting Files
Posted: Mon Jul 07, 2008 10:13 am
by EmmaCrabtree
Hi, I'm very new to Oxygen, so I'll looking for some guidance on a project I'm undertaking. I'm using Author 9.2
I want to search for files that have have a particular reference in them and file them elsewhere after the search. That's fine. I was told to make .bak files to show which files were relevant. Again fine. My problem occurs when I want to search the relevant files, .bak files, which Author can't do.
Is there a way of searching for files, moving them, and then searching in the moved files again which doesn't take a huge amount of time or that can be done by the program rather than me manually moving files?!
Any advice gratefully received.
Thanks,
Emma.
Re: Finding and Sorting Files
Posted: Mon Jul 07, 2008 3:20 pm
by sorin_ristache
Hello,
The Find/Replace in Files dialog can find the files with a particular reference. You open the dialog from the
Find/Replace in Files icon

located on the Search toolbar. You can create a .bak copy of each file containing the reference if you replace the reference with other string. If you want to find the reference without modifying it but you need a .bak copy of the file then you should replace the reference with the reference itself, that is the file will have the same content after the replace operation.
For moving files from the Author editor you have to
define an external tool which runs a command line containing a move command.
Regards,
Sorin
Re: Finding and Sorting Files
Posted: Mon Jul 07, 2008 4:21 pm
by EmmaCrabtree
Thanks!
Can you run a search for code that is missing?
Cheers,
Emma.
Re: Finding and Sorting Files
Posted: Mon Jul 07, 2008 4:27 pm
by sorin_ristache
Do you mean to find all the files that do not contain a search pattern? No, that is not possible with the two find/replace dialogs of Oxygen. Can you give an example just in case I do not understand your request correctly?
Regards,
Sorin
Re: Finding and Sorting Files
Posted: Mon Jul 07, 2008 4:57 pm
by EmmaCrabtree
Hi Sorin,
I'm looking for files that only contain </filmId> rather than the full string of <filmId></filmId>
Can this be done?
Thanks,
Emma.
Re: Finding and Sorting Files
Posted: Mon Jul 07, 2008 5:23 pm
by sorin_ristache
If you want to find the files that contain the string </filmId> which is not preceded by the string <filmId> you must use the regular expression (?<!(<filmId>))</filmId> in the Text to find field of the dialog.
Regards,
Sorin
Re: Finding and Sorting Files
Posted: Mon Jul 07, 2008 5:25 pm
by EmmaCrabtree
Thank you Sorin, I will try that.
regards,
Emma.
Re: Finding and Sorting Files
Posted: Mon Jul 07, 2008 5:30 pm
by EmmaCrabtree
Ok, so that didn't work!!!!
What I have are 2 sets of files; one with <filmId></filmId> and the other with a 6 figure digit followed by </filmId> e.g. 123456</filmId>
The coding is wrong i.e. it ought to be <filmId>123456</filmId> so I am trying to work around this and find the files with the 6 figure digit.
Any ideas?!
Thanks,
Emma.
Re: Finding and Sorting Files
Posted: Mon Jul 07, 2008 5:44 pm
by sorin_ristache
In that case my regexp will find the file with </filmId> preceded by digits (generally preceded by a string that is not <filmId>) and will not find the file with <filmId></filmId>. Did you check the checkbox Regular expression of the Find/Replace dialog?
Regards,
Sorin
Re: Finding and Sorting Files
Posted: Mon Jul 07, 2008 5:56 pm
by EmmaCrabtree
ah, ha! Checking the Regular Expression box is bringing up data.
Thank you!

Re: Finding and Sorting Files
Posted: Mon Jul 07, 2008 6:28 pm
by EmmaCrabtree
Hi Sorrin,
I've been able to search for most of the files using the tips you gave me, but I think I am missing some (due to a previous search that brought up more files).
Should your string work to find 123456</filmId> only?
Thanks,
Emma.
Re: Finding and Sorting Files
Posted: Tue Jul 08, 2008 11:47 am
by sorin_ristache
The regular expression (?<!(<filmId>))</filmId> finds any </filmId> that is not preceded by <filmId>.
Regards,
Sorin
Re: Finding and Sorting Files
Posted: Tue Jul 08, 2008 2:31 pm
by EmmaCrabtree
Thanks Sorin, I think I've got what I need. Your advice has been priceless.
Cheers,
Emma.