X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Andrew DeFaria Subject: Re: Perl script called by windows batch file in Scheduled task can't find mount or windows share Date: Sun, 19 Feb 2006 08:33:29 -0800 Lines: 50 Message-ID: References: <20060219094158 DOT 15236 DOT qmail AT web81508 DOT mail DOT mud DOT yahoo DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 1.5 (Windows/20051201) In-Reply-To: <20060219094158.15236.qmail@web81508.mail.mud.yahoo.com> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Indra Gunawan wrote: > Although I've found many issues related to "mount" I've yet to find > the answer to my current problem. So, I hope I can find the answer > from my posting now. > > Anyway, I would like to copy the software installer exe file to a n > ftproot folder on another windows machine as part of software build > process for download. The build process itself is automated in a perl > script under cygwin environment called by batch file executed as > Windows Scheduled Task. > > It's executed in batch file like this: c:\tools\cygwin\bin\bash > --login -c 'source /temp/machenv;time > c:/scripts/batch/NightlyBuild/build.pl' > logs/bld.log 2>&1 > > I've made sure that I mapped the ftproot folder as UNC path using the > local administrator of the ftp hosting > machine first: > > net use \\\C$\Inetpub\ftproot > /user:administrator /persistent:yes > > and in cygwin bash shell I did this: mount > \\\\\\C$\\Inetpub\\ftproot /ftproot -s -E > > All are fine. However, the test for existence of this folder /ftproot > fails, thus the copy does not work in > the build script as executed by batch file in Scheduled Task. > > However, if I launch Windows shell and run the batch file, the build > script works and the copy is successful. > > I created a new scheduled task to execute simple batch file which > calls a perl script to debug/find out about the "mount" command in > cygwin. This mount point /ftproot is still available but the script > issuing "cd /ftproot" and "ls" both fail. > > cd: can't cd to /ftproot > ls: /ftproot: No such file or directory > > However, again running it in Windows shell the "cd /ftproot" and "ls" > work. > > Is the issue with the bash, or the Windows Scheduled Task or some > issue with mounting UNC share? Why all this additional complication of using bat files and Windows Scheduled Tasks and Perl scripts, etc.? If you are scheduling something then use cron. If you wish to reach out over a UNC path then ///// should work fine. And if you are getting something via ftp use ncftpget. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/