File Copy Does Not Work

Advertisement

barrys
Joined:
Posts:
2

File Copy Does Not Work

Hi,
I am unable to copy files in either direction. The log is below. I am running ssh on W2K Server.

Please help.
Thanks
Barry
Copying 1 files/directories to remote directory "/cygdrive/d/test/"
  PrTime: Yes; PrRO: Yes; Rght: rw-r--r--; PrR: No
  FnCs: N; TM: B; AscM: *.*htm*; *.txt; *.php*; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
echo "WinSCP: this is begin-of-file" ; scp -r  -1 -d -t "/cygdrive/d/test" ; echo "WinSCP: this is end-of-file:$?"
scp: not found
WinSCP: this is begin-of-file
inSCP: this is end-of-file:127
Waiting for data timed out, asking user what to do.
Asking user: :?

Reply with quote

Advertisement

barrys

Re: File Copy Does Not Work

I figured it out.
For some reason, scp.exe was not installed when Open SSH for windows was installed. I needed to manually copy over the scp.exe file to a directory in my PATH.

Reply with quote

balacam
Joined:
Posts:
1
Location:
Istanbul

Hello

I am trying to copy files from Linux to Windows Server with a script, but I am getting the below error. The file exists but WinSCP can not find the file. I am using a task scheduler for this action. Sorry I didn't find how can open a new topic.
 2022-10-19 08:51:28.610 Startup conversation with host finished.
< 2022-10-19 08:51:28.610 Script: Session started.
< 2022-10-19 08:51:28.610 Script: Active session: [1] root@172.18.86.162
> 2022-10-19 08:51:28.610 Script: put /home/bitrix/www/aaa D:/Data/FILE/01_MaslakHQ/03_UluslararasiOperasyon/02_BilgiTeknolojileri/00_Public_IT/Code/
. 2022-10-19 08:51:28.610 Copying 1 files/directories to remote directory "D:/Data/FILE/01_MaslakHQ/03_UluslararasiOperasyon/02_BilgiTeknolojileri/00_Public_IT/Code/" - total size: 0
. 2022-10-19 08:51:28.610   PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask: 
. 2022-10-19 08:51:28.610   TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; EncryptNewFiles: Yes; ExcludeHiddenFiles: No; ExcludeEmptyDirectories: No; InclM: ; ResumeL: 0
. 2022-10-19 08:51:28.610   AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
* 2022-10-19 08:51:28.610 (EOSError) System Error.  Code: 3.
 
* 2022-10-19 08:51:28.610 The system cannot find the path specified
. 2022-10-19 08:51:28.610 Asking user:
. 2022-10-19 08:51:28.610 File or folder '/home/bitrix/www/aaa' does not exist. ("System Error.  Code: 3.
 
. 2022-10-19 08:51:28.610 The system cannot find the path specified")
< 2022-10-19 08:51:28.610 Script: File or folder '/home/bitrix/www/aaa' does not exist.
< 2022-10-19 08:51:28.610 Script: System Error.  Code: 3.

Description: The file is exist.

Screenshot 2022-10-19 105825.png

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,517
Location:
Prague, Czechia

Re: Hello

@balacam: You seem to have the arguments reversed. It should be put source dest (and backslashes in the Windows path):
put D:\Data\FILE\01_MaslakHQ\03_UluslararasiOperasyon\02_BilgiTeknolojileri\00_Public_IT\Code\ /home/bitrix/www/aaa
Additionally you might have the trailing slashes wrong. Ending source path with slash and destination path without is usually wrong.
Please read https://winscp.net/eng/docs/scriptcommand_put

Reply with quote

Advertisement

You can post new topics in this forum