1

I need to copy a file from windows to UNIX to a specific folder and set the file group (chgrp or something). The problem is that i have more than 16 groups in unix.

Is there a way to do it without writing and launching a UNIX script?

saritonin
  • 247
  • 2
  • 18
user1616144
  • 43
  • 1
  • 1
  • 7

2 Answers2

4

It should work using PSCP. Instructions:

  1. Download PSCP.EXE from Putty download page
  2. Open command prompt and type set PATH=<path to the pscp.exe file>
  3. In command prompt point to the location of the pscp.exe using cd command
  4. Type pscp
  5. use the following command to copy file form remote server to the local system

    pscp [options] [user@]host:source target

So to copy the file /etc/hosts from the server example.com as user fred to the file c:\temp\example-hosts.txt, you would type:

pscp fred@example.com:/etc/hosts c:\temp\example-hosts.txt

Source

Community
  • 1
  • 1
Ravi Dhoriya ツ
  • 4,435
  • 8
  • 37
  • 48
0

The above answer by @Ravi Dhoriya is good but sometimes it does not work. You might need to add the -scp flag to force the scp protocol:

pscp -scp fred@example.com:/etc/hosts c:\temp\example-hosts.txt
VCarstein
  • 1
  • 1