Hi,
I am new to this forum, I want to write a script which will transfer files from linux to windows,
on my Linux server ftp is disabled,
On your Linux machine create a script that will use smbclient to transfer your file which might look something like this:
======================= CAUTION : UNTESTED!!! =====================
I just wrote this on the fly...
====================== USE AT YOUR OWN RISK!!! ====================
#!/bin/bash
#
# cp2win
# Transfer a file to a windows machine using smbclient
# Script by hardwyrd (c) 2008
#
# Syntax:
# cp2win switch host-folder file remote-username remote-password
#
# Example:
# cp2win nologin \\\\myserver\myshare myfile.txt
# cp2win \\\\myserver\myshare myfile.txt myuser mypassword
#
# switch:
# nologin - turns on using login credential
#
# host-folder: must be in the format \\\\machine\folder
case $1 in
nologin )
smbclient $2 -c "put $3"
;;
* )
smbclient $1 -U $3%$4 -c "put $2"
;;
esac