Sponsored Content
Top Forums Shell Programming and Scripting Sftp some files from windows server to UNIX server Post 302761381 by RudiC on Friday 25th of January 2013 02:04:41 PM
Old 01-25-2013
What about reading the man stfp page? No if, no else, no mv, but:
Quote:
NAME
sftp — secure file transfer program
.
.
.
rename oldpath newpath
Rename remote file from oldpath to newpath.
So - check for existence of control file with e.g. ssh ... ls, then get and rename files with sftp.

BTW - your here document is missing its final token (EOF)
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SFTP from windows E:/ to unix server

Hello All :), I am making a script in the ksh to Secure FTP a set of files from the E:/ drive in windows a computer to a unix server. Had it been in the unix directory, I could have used the expect utility to use the non-interactive mode for sftp, #!/usr/local/bin/expect #!/bin/ksh ... (12 Replies)
Discussion started by: pranavagarwal
12 Replies

2. Shell Programming and Scripting

SFTP failure from unix to windows server

Hi, I am having unix server SUNW,Sun-Fire-V245. remote windows server details: Microsoft Windows In my script i am sftp'ing files to the windows server through sftp command. But the problem i am facing is, some files are successfully sftp'd to windows server and for some files sftp is... (0 Replies)
Discussion started by: syamkp
0 Replies

3. Shell Programming and Scripting

FTPing files from unix server to windows server

Hi, Below is the script which ftps the file from unix server and putting in a different directory(but on unix server) How can i ftp the files from unix server and to place in a secure location on windows server? what changes needs to be done to the below script? How can this be... (1 Reply)
Discussion started by: venkatesht
1 Replies

4. Shell Programming and Scripting

Error copying files from Unix (Solaris10) to Windows Server 2003 using scp/sftp

Hi, I have generated a Public/Private Key Pair in Solaris Unix (source) server and deployed the Public key in Windows 2003(target) server .ssh directory of user profile. When i try to connect(ssh, scp, sftp) from Unix, i'm getting below error message. Sun_SSH_1.1, SSH protocols 1.5/2.0,... (0 Replies)
Discussion started by: ajaykumarb
0 Replies

5. Shell Programming and Scripting

Unix shell script to Copy files from one Windows server to another Windows server.

Can anybody please help me on how to code for the below requirement: I need to write a shell script (on different unix server) to copy files from multiple folders (ex. BRN-000001) from one windows server (\\boldls-mwe-dev4)to a different windows server(\\rrwin-ewhd04.ecomad.int). This shell... (4 Replies)
Discussion started by: SravsJaya
4 Replies

6. IP Networking

How to transfer files from UNIX server to windows machine or vice versa using ftp or sftp commands?

hi, i want to write a shell script code which transfers files from a directory in unix server to a directory in a windows machine.. can any1 give me a sample code which uses ftp or sftp command.. thanks very much, (3 Replies)
Discussion started by: Little
3 Replies

7. Shell Programming and Scripting

Needed SFTP script from windows to UNIX server and from UNIX to windows server(reverse SFTP)

hi guys, i need a script to sftp the file from windows to unix server ....(before that i have to check whether the file exists in the windows server or not and again i have to reverse sftp the files from unix to windows server..... regards, Vasa Saikumar. (13 Replies)
Discussion started by: hemanthsaikumar
13 Replies

8. Solaris

FTP-ing files from Windows server to UNIX server

I need to transfer files from a Windows server to the Unix server and have to run some shell script on it to get the required output. Is it possible to transfer files from Windows server to unix server through any shell script? If so can you please help me with the details. Thanks in... (8 Replies)
Discussion started by: ssk250
8 Replies

9. Shell Programming and Scripting

Copying the files to Windows server from UNIX server

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... (4 Replies)
Discussion started by: gvkumar25
4 Replies

10. Shell Programming and Scripting

Do I require remote login access to a windows server to transfer files from a UNIX server

Hi All I need to transfer a file from a UNIX server to a windows server. I saw that it is possible to do this using scp command by looking at the forum listed below: ... (2 Replies)
Discussion started by: vx04
2 Replies
RFIO_RENAME(3)						      Rfio Library Functions						    RFIO_RENAME(3)

NAME
rfio_rename - rename a file or directory SYNOPSIS
#include <sys/types.h> #include "rfio_api.h" int rfio_rename (const char *oldpath, const char *newpath) DESCRIPTION
rfio_rename renames a file or directory. oldpath and newpath must be of the same type, i.e. both regular files or both directories. If newpath exists already, it will be removed before the rename takes place. If newpath is a directory, it must be empty. When renaming a directory, newpath must not be a descendant of oldpath, i.e. newpath must not contain a path prefix that names oldpath. Write permission is required on both parents. If oldpath is a directory, write permission is required on it and if newpath is an existing directory, write permission is also required on it. If any of the parents has the sticky bit S_ISVTX set, either the effective user ID of the requestor must match the owner ID of the file or the effective user ID of the requestor must match the owner ID of the directory or the file must be writable by the requestor or the requestor must be super-user. RETURN VALUE
This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, serrno is set appropriately. ERRORS
ENOENT A component of oldpath prefix does not exist or oldpath or newpath is a null pathname. EACCES Search permission is denied on a component of the path prefixes or write permission on the parent directories is denied or oldpath is a directory and write permission is denied on oldpath or newpath. EFAULT oldpath or newpath is a NULL pointer. EEXIST newpath is an existing directory and is not empty. ENOTDIR A component of the path prefixes is not a directory or oldpath is a directory and newpath is an existing regular file. EISDIR newpath is a directory while oldpath is a regular file. EINVAL newpath is a descendant of oldpath. ENAMETOOLONG The length of oldpath or newpath exceeds CA_MAXPATHLEN or the length of a path component exceeds CA_MAXNAMELEN. SENOSHOST Host unknown. SENOSSERV Service unknown. SECOMERR Communication error. ERFXHOST Cross-host rename is not supported. SEE ALSO
Castor_limits(4), rfio_chmod(3), rfio_unlink(3) AUTHOR
LCG Grid Deployment Team LCG
$Date: 2005/03/31 13:13:03 $ RFIO_RENAME(3)
All times are GMT -4. The time now is 03:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy