473,404 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Copy file from one machine to another machine using perl

HI ,

I want to copy a file from one machine to another machine using perl.
Also i want to know whether i can past arguments to perl program?
Sep 21 '07 #1
4 8944
prn
254 Expert 100+
Hi Npreeti,

Basically you copy a file from one machine to another with perl the same ways you would without perl. Perl can be used to automate the process, but doesn't replace any of them. And using perl doesn't change (certainly doesn't reduce!) the needs for security in doing so.

I'd recommend checking the perl modules Net::SCP and Net::SFTP for doing that. Both are built around secure protocols for during the transfer, but be careful to note that you still have to set up a secure means of protecting your passwords or other access credentials (e.g., RSA keys). I wish there were a good, simple, general means of doing that, but everyone's situation is different, so there's just no one-size-fits-all solution.

HTH,
Paul
Sep 21 '07 #2
prn
254 Expert 100+
Oh, regarding how to "past" arguments, I am guessing that you mean "post"? As in how do you read command line arguments in a perl program. Look up @ARGV. Google is your friend here as elsewhere.

Best Regards,
Paul
Sep 21 '07 #3
Oh, regarding how to "past" arguments, I am guessing that you mean "post"? As in how do you read command line arguments in a perl program. Look up @ARGV. Google is your friend here as elsewhere.

Best Regards,
Paul
Hi Paul,

Thank you for your reply.

As I am very new to perl as well as socket programming.I have one more doubt ,
In socket programming,i am conneting two machines,after establishing connection i have to send a file to remote machine (server),in server i have to check whether the file is received or not?

I am using TCP protocol for this,also for sending a file name send command i am using.also at server script recv command i have used.I dont know whether this is correct or not?

I will be very thankful to you if u help me out of this problem.

Regards,
Preeti
Sep 24 '07 #4
numberwhun
3,509 Expert Mod 2GB
Hi Paul,

Thank you for your reply.

As I am very new to perl as well as socket programming.I have one more doubt ,
In socket programming,i am conneting two machines,after establishing connection i have to send a file to remote machine (server),in server i have to check whether the file is received or not?

I am using TCP protocol for this,also for sending a file name send command i am using.also at server script recv command i have used.I dont know whether this is correct or not?

I will be very thankful to you if u help me out of this problem.

Regards,
Preeti
I have corrected the formatting of your post. Please do not top post. Always put your reply below the post you are replying to. Otherwise,

?
about
talking
are
you
what
know
anyone
will
how


Regards,

Jeff
Sep 24 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Tony George | last post by:
Hi, I'm having a problem using the Copy module on a ClearCase view that's been set as "readonly" (i.e. ct chview -readonly <view tag>). I want to copy a file out of this view and put it in...
2
by: Paul | last post by:
Dear All, I want to use web form to upload my file and copy the file to another machine. I can upload the file, but when I copy the file(file.CopyTo(".....", true)) to another machine(map...
1
by: PRM | last post by:
Hi I have an ASp.net application using C#. I need to copy a file present on the web server machine to a remote machine on the network. Although this seems to be a trivial matter I am having...
1
by: POnfri | last post by:
Hi, I have a problem in a peace of code were i'm doing a file copy using File.Copy. The Source is local and the target is a remote machine. Example: File.Copy(C:\temp\hi.txt,...
0
by: PRM | last post by:
Hi I have an ASp.net application using C#. I need to copy a file present on the web server machine to a remote machine on the network. Although this seems to be a trivial matter I am having...
3
by: Johnny | last post by:
Hi, I have created an ASP.NET application (let's call it FooBar) with VS.NET on my local machine, residing in http://localhost/FooBar. Deploying it to another folder on my machine works well...
2
by: Shailesh Gajare | last post by:
Hi All, I have creating an ASP.Net application with two web servers. I am uploading a file which is being uploaded on one of the server, I want to copy the uploaded file on the other server at the...
9
by: fniles | last post by:
I would like to copy a table(s) from SQL Server 2005 to a CVS file and vice versa. I was thinking to use the BCP command line utility, but I have a few questions: 1. The machine where I am...
1
by: jawas | last post by:
Can any body help to write the general Perl script to transfer file from one window XP machine to another window XP machine and then change the file name and send some command for e.g config, 9,9 to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.