Could do something similar by using a bat file as the action and placing all of that into the batch file, but I am not sure how WUHU and windows would handleMessage 1 of 20 , Jun 26, 2008View SourceCould do something similar by using a bat file as the action and placing all of that into the batch file, but I am not sure how WUHU and windows would handle the cleanup there. But that may not help the situation. or maybe a bat file to call a bat file without the wait for the second bat to finish so you would then be letting windows handle the closing of the second command prompt that is generated and WUHU would almost instantly be given the first bat file back ok. Just a thought albeit abstract.
LarryOn Thu, Jun 26, 2008 at 11:07 AM, wuhu_software <wuhu_software@...> wrote:
I guess for any FTP transfer there is a minimal amount of configuration information that is required to transfer a file.
You would need to define the user name, password, server, destination directory, and local file that you are attempting to transfer.
I could see creating an action with the following format:
ftp://user:password@ftpserver/dest-dir "local-source-file1" "local-source-file2" ...
Note that the double quotes will be needed on the local source files as long filenames can have spaces.
So an example use might look like:
ftp://myusername:mypassword@.../weather "C:\Heavyweather\XML1.xml" "C:\Heavyweather\XML2.xml"
Would transfer two files to the destination directory.
The only problem with that format is that it specifies a single target directory where all files must be placed. If you wanted to upload multiple files to seperate directories, you would need to use multiple actions.
A way around this might be to use a format like:
ftp://user:password@ftpserver "local-source-file1" "remote-dest-file1" "local-source-file2" "remote-dest-file2" ...
Where the local file to be sent has a coresponding target file name on the remote server. At least one pair of source/dest strings would be required. There would be no limit to the number of files transfered.
I guess that I would prefer the second format as it gives the most flexibility.
The only issue I see is that these actions would need to be executed asynchronously on a seperate thread. That would mean that WUHU would need to track all of the threads it creates to launch FTP uploads and gracefully terminate them if the user exits the application. In general, I never have the operating system clean up for me although I might make an exception in this case since the thread has all of the information in needs in a single string (allocated from the heap).
Currently WUHU launches processes as detached and does not wait for them.
For example, I am uploading files to an FTP server using this action:
silent:ftp.exe "-n -s:c:\Heavyweather\FTPScript.txt"
Since that process is spawned and detached, WUHU does not need to wait for the child process to exit, unlike a local thread.
If you are interested in writing the above described function, let me know.
I am using MFC and C++.
--- In firstname.lastname@example.org, Rich Allen <rico@...> wrote:
>> Yes, I know it can be done with a separate ftp application. I wanted
> WUHU to do it for me so I didn't have to set up and configure yet
> another app. :P
> wuhu_software wrote:
> > Rich,
> > You can do this easily enough.
> > You would create an XML template input file.
> > The resulting output XML file is created on the local hard drive.
> > After the template is processed, you then launch an FTP session to
> > upload the output file. You can also launch this process silently so
> > that it does not pop up a window.
> > If you need any help with templates, let us know.
> > Thanks.
> > ---
> > It was just a "nice to have" idea, no big deal. What I was thinking
> > of was for WUHU to create an in-memory XML document, post that to an
> > arbitrary site via FTP, and move on. But now I'm set on hosting my
> > web sites here at the house so it's moot. I won't need the feature
> > anymore. :)
> > Rich
> > ------------------------------------
> > To visit your group on the web, go to:
> > http://groups.yahoo.com/group/wuhu_software_group/
> > Want more or less group messages (Special notices as a minimum)?http://groups.yahoo.com/group/wuhu_software_group/join
> > To unsubscribe from this group, send an email to:
> > email@example.com
> > WUHU Download page:
> > http://home.comcast.net/~wuhu_software/Yahoo! Groups Links