Re :File Transfer

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
abhishekkumarrai3
Posts: 12
Joined: 25 Aug 2016 04:20

Re :File Transfer

#1 Post by abhishekkumarrai3 » 01 Sep 2016 21:46

Hi,

i need to transfer file from From one Remote server to other Remote server, and also i dont have admin Access

so please help me how can i do this through Batch script.

Thanks,
Ak

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Re :File Transfer

#2 Post by ShadowThief » 01 Sep 2016 22:22

What makes you think something like this is possible?

abhishekkumarrai3
Posts: 12
Joined: 25 Aug 2016 04:20

Re: Re :File Transfer

#3 Post by abhishekkumarrai3 » 01 Sep 2016 22:26

ShadowThief wrote:What makes you think something like this is possible?



please sugest me how can i transfer file from one remote server to other if i have username and password

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Re :File Transfer

#4 Post by ShadowThief » 01 Sep 2016 23:13

abhishekkumarrai3 wrote:
ShadowThief wrote:What makes you think something like this is possible?



please sugest me how can i transfer file from one remote server to other if i have username and password

My question still stands. Why would this be possible?

abhishekkumarrai3
Posts: 12
Joined: 25 Aug 2016 04:20

Re: Re :File Transfer

#5 Post by abhishekkumarrai3 » 01 Sep 2016 23:17

ShadowThief wrote:
abhishekkumarrai3 wrote:
ShadowThief wrote:What makes you think something like this is possible?



please sugest me how can i transfer file from one remote server to other if i have username and password

My question still stands. Why would this be possible?




i dont have idea...i just want to transfer file from one server to other remote server..

if you have any method please suggest me.

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Re :File Transfer

#6 Post by ShadowThief » 01 Sep 2016 23:22

Unless the servers already have file transfer software like FTP installed, you can't.

abhishekkumarrai3
Posts: 12
Joined: 25 Aug 2016 04:20

Re: Re :File Transfer

#7 Post by abhishekkumarrai3 » 02 Sep 2016 03:44

ShadowThief wrote:Unless the servers already have file transfer software like FTP installed, you can't.




i have installed the FTP, Now please suggest me how can i do now

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: Re :File Transfer

#8 Post by Squashman » 02 Sep 2016 06:23

abhishekkumarrai3 wrote:
ShadowThief wrote:Unless the servers already have file transfer software like FTP installed, you can't.




i have installed the FTP, Now please suggest me how can i do now


Use an FTP client like Filezilla or whatever one you want to use.

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Re :File Transfer

#9 Post by penpen » 02 Sep 2016 06:28

If the server supports SSH and SCP, you could also do it this way:
https://www.youtube.com/watch?v=P4Q4asK8QPU


penpen

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Re :File Transfer

#10 Post by foxidrive » 04 Sep 2016 18:00

abhishekkumarrai3 wrote:Hi,
i need to transfer file from From one Remote server to other Remote server, and also i dont have admin Access


You have not given enough information about your task to help you in an effective way.

See here: viewtopic.php?f=3&t=6108

douglas.swehla
Posts: 75
Joined: 01 Jun 2016 09:25

Re: Re :File Transfer

#11 Post by douglas.swehla » 04 Sep 2016 20:08

It depends on what you mean by "remote". If the servers are on your network, then the normal utilities (MOVE, COPY, XCOPY, ROBOCOPY) should work. I think the first three require that you have a drive letter mapped to a share on the remote machine. ROBOCOPY lets you specify a drive letter or server name.

You may also wish to investigate the WinRM (Windows Remote Management) and WinRS (Windows Remote Shell) tools. These require that WinRM be installed and authorized on each machine to be used.

For each of the commands mentioned above, you can enter commandname /? at the command prompt to get instructions on how to use it. For example:

Code: Select all

C:\test>robocopy /?
-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows                             
-------------------------------------------------------------------------------

  Started : Sun Sep 04 18:49:41 2016

              Usage :: ROBOCOPY source destination [file [file]...] [options]

             source :: Source Directory (drive:\path or \\server\share\path).
        destination :: Destination Dir  (drive:\path or \\server\share\path).
               file :: File(s) to copy  (names/wildcards: default is "*.*").

::
:: Copy options :
::
                 /S :: copy Subdirectories, but not empty ones.
                 /E :: copy subdirectories, including Empty ones.
             /LEV:n :: only copy the top n LEVels of the source directory tree.
.
.
.

C:\test>


The output above has been cut short. It is a very big program with lots of options.

If "remote" means "not on your network", then you will need to provide more information, as the others have said.

abhishekkumarrai3
Posts: 12
Joined: 25 Aug 2016 04:20

Re: Re :File Transfer

#12 Post by abhishekkumarrai3 » 09 Sep 2016 03:50

douglas.swehla wrote:It depends on what you mean by "remote". If the servers are on your network, then the normal utilities (MOVE, COPY, XCOPY, ROBOCOPY) should work. I think the first three require that you have a drive letter mapped to a share on the remote machine. ROBOCOPY lets you specify a drive letter or server name.

You may also wish to investigate the WinRM (Windows Remote Management) and WinRS (Windows Remote Shell) tools. These require that WinRM be installed and authorized on each machine to be used.

For each of the commands mentioned above, you can enter commandname /? at the command prompt to get instructions on how to use it. For example:

Code: Select all

C:\test>robocopy /?
-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows                             
-------------------------------------------------------------------------------

  Started : Sun Sep 04 18:49:41 2016

              Usage :: ROBOCOPY source destination [file [file]...] [options]

             source :: Source Directory (drive:\path or \\server\share\path).
        destination :: Destination Dir  (drive:\path or \\server\share\path).
               file :: File(s) to copy  (names/wildcards: default is "*.*").

::
:: Copy options :
::
                 /S :: copy Subdirectories, but not empty ones.
                 /E :: copy subdirectories, including Empty ones.
             /LEV:n :: only copy the top n LEVels of the source directory tree.
.
.
.

C:\test>


The output above has been cut short. It is a very big program with lots of options.

If "remote" means "not on your network", then you will need to provide more information, as the others have said.





*I want to transfer the file through PSCP command....and here Remote server means Remote Desktop ...
*and i have to transfer file from one Remote Desktop to other Remote Desktop.

please help me for this.

Thanks,
Abhi

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Re :File Transfer

#13 Post by penpen » 09 Sep 2016 07:07

abhishekkumarrai3 wrote:I want to transfer the file through PSCP command....
First to say, you should have mentionmed PSCP earlier (for example: in your opening post).
Second: Have you seen my above post?
In this video scp under PuTTY is used to transfer files (you want to use PSCP == "PuTTY Secure Copy client").
There are only two things that are different:
1) You cannot start the scp command from one of the servers.
2) You must add a 'p' to the "scp" command ("pscp").

I never tested if this is possible to copy frome one server to another with that command (i recommend to use putty instead - if possible).
So this might or might not work:

Code: Select all

pscp [options] [user@]host:source [user@]host:target
If this doesn't work you have to use the command (shown in the vide) twice (server1 ->own pc; own pc -> server2).


penpen

Post Reply