The issue is not so much writing the script, the issue is what mechanism you use to transfer the files and how to automate the access mechanism. If the UNIX system has ssh installed on it then this is an easy exercise. You would just use scp to recursively copy -r , see this link Code :.
Thanks a lot blackrageous. I do use scp to copy files from local linux machine to other servers but is it the same for my windows pc? I mean can I copy the same way? And how do I match the directory tree? Should I put unix directory tree in one variable and windows tree in another and through loop say if those two are equal do the scp?
Thanks for the awesome link! Join Date: Aug Originally Posted by saleheen. Should I put unix directory tree in one variable and windows tree in another. Find all posts by Corona How would you even know the UNIX one? You are right! Here's an idea. What if I copy the whole project from windows to unix using recursive scp and use a for loop and wild card to match the directory name in both,as you suggested the stripping of part in unix can be done using pwd, rev and awk? Is that possible? Shell Programming and Scripting.
Hi Team, I had a requirement to write a shell script which automatically transfer the files from unix server to windows server. I can able to unix to unix using Scp command. I am not sure how to do unix to windows. I am very new on this concept. Could you please help me or guide in Problem copying files from windows to unix. Andrew Andrew Add a comment. Active Oldest Votes. Improve this answer. Timothy Martin Timothy Martin 7, 1 1 gold badge 31 31 silver badges 39 39 bronze badges.
Can I do this on Windows? Can I make the multiple extensions gracefully handle any missing formats? BradGreens You should really post a new question rather than asking here in the comments. Your question may even have an answer already.
Posting a new question will not only get you an answer but it will then be searchable by others who need the same help. Ofek Ortal Ofek Ortal 9 2 2 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. I've got this code so far, but how best can it be achieved? Improve this question. Richard Richard 7 1 1 silver badge 4 4 bronze badges. Do you want the same source file copied to the same target or a different target each time?.
Richard, is that comment of yours your own suggestion as a starting point, or a solution that you're now using? Other than that, the approach works.
Add a comment. Active Oldest Votes. You want a forever-repeating loop! Improve this answer. Thanks roaima : — Richard. Sign up or log in Sign up using Google.
0コメント