OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

searching and batch processing of files

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
9point9
Moderator
Moderator


Joined: 31 Aug 2004
Posts: 3875
Location: UK

PostPosted: Wed Sep 01, 2004 4:14 am    Post subject: searching and batch processing of files Reply with quote

I'm currently investigating writing a macro in OOo which will allow searching of files that match set criteria and then carrying out a process on those files.

In pseudo-code it goes a bit like this:

Search for files matching criteria with directory (inc. sub-directories)

For i = 1 to [total number of files found matching criteria]

Carry out process on file number i

Next i

I have done such a thing previously with VBA, but I think I could do better with OOo. At the moment I'm planning to use it to print files to PDF and produce HTML indexes of files in user defined directories.

If I can get this working then I might be able to convince my employer to make OOo available for users who would find it useful, say, all 5000 of them.

I'm new to using OOo macros so don't know how to search for files. I've not been able to find much in the help system so far.

Thanks in advance for anything anyone puts forward on this.
_________________
Arch Linux
OOo 3.2.0

OOoSVN, change control for OOo documents:
http://sourceforge.net/projects/ooosvn/
Back to top
View user's profile Send private message Visit poster's website
SergeM
Super User
Super User


Joined: 09 Sep 2003
Posts: 3211
Location: Troyes France

PostPosted: Wed Sep 01, 2004 5:19 am    Post subject: Reply with quote

5000 users ? wow !
Sorry I have no answer but only a question for the moment :
what do you mean by "matching a criteria" ? is ti on the file's name or on the file's content ?
_________________
Linux & Windows OOo3.0
UNO & C++ : WIKI
http://wiki.services.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK
In French
http://wiki.services.openoffice.org/wiki/Documentation/FR/Cpp_Guide
Back to top
View user's profile Send private message Visit poster's website
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Wed Sep 01, 2004 5:37 am    Post subject: Reply with quote

Here are two examples I've posted in the past showing how to recursively process files in a folder and all sub folders.

Recursive Folder of Html into PDF,Txt,SXW,DOC
http://www.oooforum.org/forum/viewtopic.php?p=45659#45659

Recursively walk file system, find most recently modified file
http://www.oooforum.org/forum/viewtopic.php?t=7631


You might also find this recent discussion to be helpful......
Is there a beginners guide to Oo basic?
http://www.oooforum.org/forum/viewtopic.php?t=11990
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
9point9
Moderator
Moderator


Joined: 31 Aug 2004
Posts: 3875
Location: UK

PostPosted: Wed Sep 01, 2004 7:22 am    Post subject: Reply with quote

Thanks for those links. That first one is pretty much what I'm trying to do.

In this case I'd be searching by filename. For instance all *.doc's. I'm not an MS fan at all and seeing how batch processing in Word hasn't got me where I wanted to get I'm looking for an alternative.
_________________
Arch Linux
OOo 3.2.0

OOoSVN, change control for OOo documents:
http://sourceforge.net/projects/ooosvn/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group