Jump to content
Macro Express Forums

Can Directory Modification do this?


Recommended Posts

I"m new to V4.

 

I use OmniPage to automatically OCR incoming email attachments files and pdf them. Due to OmniPage limitations, the resulting files have to get saved in one particular folder ("F:\New OCR's") in this format: "1234;Johnson.pdf" OR "1234567;Contract.pdf", where the 4 or 7 digits before the first semicolon are the case account number.

 

Can ME watch that output folder and when a new file appears, copy the file to a new directory based upon the filename and save under a slightly different name. Examples:

 

"1234;Johnson.pdf" would be saved to folder S:\1234\ as "S:\1234\1234;Johnson;OCR'd.pdf"

 

"1234567;Contract.pdf" would be saved to folder S:\1234567\ as "S:\1234567\1234567;Contract;OCR'd.pdf"

 

Any ideas?

 

Thanks,

 

Jeff Mazor

Link to comment
Share on other sites

Yes, this is gaga-googoo. Like Paul said use the activation of directory modification and then suck the new file name as a string and parse out the bits to be used in the logic of your filing.

 

If it's possible that two files appear at nearly the same time I would be concerned with the second file not being recognized. You might want to add a routine at the end that checks for new files and repeats the macro in that case.

Link to comment
Share on other sites

  • 3 months later...

"use the activation of directory modification and then suck the new file name as a string and parse out the bits to be used in the logic of your filing.

 

CORY: How would I do this? It would be great, cause I could then send thd file to OmniPage for OCR and renaming (addiing "-ocr" before the ".pdf"

 

Please call if you can.

 

Jeff

954-962-3500

Link to comment
Share on other sites

Use the Repeat with Folder command to get filenames.

 

The Variable Set From File path allows you to split a filepath into Drive, Path, Filename and Extension.

 

 

Don't want to be a pest, but can you give me an example? I need ME to notice the new file (as long as it does not end in "-ocr.pdf"), and then do things with it.

 

ME would watch folder F:\WP\ and its about 1000 subfolders (like F:\WP\Cases\4000\) for added image files that do NOT end in "-ocr.pdf" (like "MartinSmith.pdf"). When one is added, ME would copy that file to a corresponding folder in F:\Raw\, such as F:\Raw\Cases\4000\MartinSmith.pdf.

 

Then ME would (i) have OmniPage ocr the "Raw" file, (ii) rename the result by adding "-ocr" before the ".pdf", and (iii) save to the original folder. Since ME will ignore files that end in "-ocr.pdf", it will ignore the new "F:\WP\Cases\4000\MartinSmith-ocr.pdf."

 

I hope I'm being clear. I fear that the file watching will consume so much time, that it will be impractically slow. Thanks for reading this.

 

Jeffrey R. Mazor, Esq.

J. R. Mazor & Associates, P.A.

Presidential Circle Building

4000 Hollywood Blvd., Suite 265-s

Hollywood, FL 33021

Phone: 954-962-3500

Fax: 954-962-3560

Email: JMazor@Mazor.com

Link to comment
Share on other sites

Let me try to explain this a bit more simply.

 

I have a folder I want to watch with a 1000 subfolders with even more files. I want to be able to quickly detect the new file, and the Repeat with Folder command takes over a half hour to run through all the files in the subfolders. Is there someway the activation can also deposit the new file and path into a variable to start with?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...