WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
Rename files according to data inside the file (Read 3738 times)
enjoimark
YaBB Newbies
*
Offline



Posts: 10
Rename files according to data inside the file
Jul 7th, 2011 at 6:12pm
 
I use WD to sort thousands of Word files (.doc) every day. They then zip every morning and upload to my ftp, blah blah the usual.

What I want is a way to rename the file based on the information contained in the file.

Right now I get a file like this: 243_072011IUW@#&WJSN.doc

It is then sorted to another folder, and zipped inside a folder with many others every day.

The problem is, these are patient reports for a radiology department and there is no way to know what patient that .doc file is for until you open it up...

There is a string in the template we use that is [PATIENT NAME]. It is filled in automatically according to the patient info from another system.

Is there a way for WD to look for that string inside the word file and rename the file to something like: 243_{month}{day}{year}_PATIENT_NAME.doc???

Please help, Thanks
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2238
The Netherlands
Re: Rename files according to data inside the file
Reply #1 - Jul 8th, 2011 at 1:30pm
 
Hi,

Sorry, but word files (like many others) are binary and not really easy to parse for info. Is it possible to have a txt file with this info?

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
enjoimark
YaBB Newbies
*
Offline



Posts: 10
Re: Rename files according to data inside the file
Reply #2 - Jul 8th, 2011 at 4:57pm
 
I can run a script to convert them to text files if that is easier.

I just can't seem to write a script to rename the file with specific information contained in the text file...

So assume they are .txt files instead of .doc files... can you help me then?
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2238
The Netherlands
Re: Rename files according to data inside the file
Reply #3 - Jul 9th, 2011 at 9:01am
 
Quote:
I can run a script to convert them to text files if that is easier.

Yes, that will help. How do you convert them to txt?? What tool do you use for that?

Please send me a few example files (original doc and the corresponding txt) so I can have a look.
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
parsec
YaBB Newbies
*
Offline



Posts: 1
Re: Rename files according to data inside the file
Reply #4 - Dec 10th, 2011 at 12:03am
 
is possible move and or rename documents searchable PDF  according to data inside the file
Thank you
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2238
The Netherlands
Re: Rename files according to data inside the file
Reply #5 - Dec 11th, 2011 at 7:24am
 
It depends on the PDFs.

Some PDFs are more like pictures, so the text can not be extracted from them. Other PDFs really do contain "plain text" so it is possible to parse them.

So if your PDFs are quite "random" (from different sources), I don't think they can be used. If the PDFs come from 1 source (generated automatically in some way), the chances are much higher.

Do you have a few example files?
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Page Index Toggle Pages: 1