Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Currently there is a windows scheduled task which every day moves a number of xml files to a website via putty. I need these files to continue to be moved to their current location whilst i create a new site and get the files to move to my location.

The task xml runs the "argument" on the command line using psftp.exe. Currently the xml of the windows task looks like this:

<Actions Context="Author">
<Exec>
  <Command>psftp.exe</Command>
  <Arguments>-l username -pw password -b ftp.dat -batch currentsite.co.uk</Arguments>
  <WorkingDirectory>directory</WorkingDirectory>
</Exec>
</Actions>

This is working currently, but when i try and add another action to send the xml files to my location like below then it doesn't work.

<Actions Context="Author">
<Exec>
  <Command>psftp.exe</Command>
  <Arguments>-l username -pw password -b ftp.dat -batch currentsite.co.uk</Arguments>
  <WorkingDirectory>directory</WorkingDirectory>
</Exec>
<Exec>
  <Command>psftp.exe</Command>
  <Arguments>-l username -pw password -b ftp2.dat -batch ftp.currentsite.co.uk</Arguments>
  <WorkingDirectory>directory</WorkingDirectory>
</Exec>
</Actions>

The ftp.dat file just moves the three xml files.

put file1.xml
put file2.xml
put file3.xml
!process.vbs
bye

Any ideas why this wouldn't work, and suggestions on what to try.

Thanks

share|improve this question
    
Is ftp.currentsite.co.uk an SFTP server or an FTP server? They are two different things. –  Darth Android Aug 6 '13 at 19:54
    
I believe ftp.currentsite.co.uk is just an FTP server, not an SFTP server. Would this be a reason why it fails? I could use ssh.currentsite.co.uk? –  Tom smith Aug 6 '13 at 19:59
    
@Tomsmith: Yes, it would be a reason. SFTP works over SSH, and is a very different protocol from FTP/FTPS. –  grawity Aug 6 '13 at 20:24
    
Thank you, i have made some changes so will wait for the result. –  Tom smith Aug 6 '13 at 21:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.