Jump to content
Macro Express Forums

Hot Folder Or Drag & Drop Macro?


Les Hazlett

Recommended Posts

We have a manual operation that we do all the time. It would be very valuable to find a better way. We currently FTP newly created files from PC workstations to one of four different folders on production equipment (multiple machines). It is easy to do.

 

. Open the FTP application

. Select the destination equipment

. Select the target folder

. Transfer the file

.

. Repeat the above for each new file and each machine that needs it.

 

How good it would be if we could drag the file to a "Hot Folder" or icon that would trigger an ME macro to determine the machines that need it, the target folder, and make the FTP transfers.

 

I know how to implement the ME logic and do the FTP transfers.

 

I don't know how to do create a hot folder that would trigger an ME macro. I can't find anything about drag-n-drop to an executible macro (mxe). The solution may have more to do with Windows than with ME.

 

Can anyone out there help me find a solution?

 

Les

Link to comment
Share on other sites

Windows does provide API calls to allow a folder to be monitored. I have a VB6 program that allows you to nominate a specific folder; when its contents change, an event is raised - at which point a suitable course of action can be programmed.

 

In itself, this has little to do with ME. However... in our PGM Library, I have created a VB6 interface such that adding the functionality you require would not be very difficult.

 

Assuming that I'd written the relevant program module, and assuming that you'd bought the PGM library, you'd simply run a PGM function (i.e. a ME macro) with a specified folder name; whenever anything changed for that folder, the PGM function would receive notification of the type of change (and could obviously provide the file name, etc.), at which point your controlling macro would take the appropriate action.

 

Of course, at this stage the PGM library does not contain this additional functionality, and you have (probably) not bought it <g>!

Link to comment
Share on other sites

Hi, Paul,

 

You may see 9multiple field input) that I have asked Floyd about calling VBA Word macros from his .vbs script access. I DO have the PGM macro library as well as the ME book.(library not yet used in any of my regular macros!) Will your addition allow calling previously written VBA Word macros?

 

I don't look forward to having to write them all again in vbs?

 

Thanks, Randall

Link to comment
Share on other sites

Will your addition allow calling previously written VBA Word macros?

 

Yes, easily. In fact one of my works in progress is an Office-capable module, dealing with Excel, Word, etc. Running a pre-existing macro is very straight-forward.

 

This could equally well be done in VB Script, or presumably JScript, by creating the Word object, then linking to existing macros.

 

So, with some tinkering, Floyd's approach could be tailored to handle your requirements.

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...