Sponsored Content
Special Forums IP Networking Proxy Server Upload file from desktop to UNIX server via putty Post 302886941 by techy1 on Tuesday 4th of February 2014 12:21:55 PM
Old 02-04-2014
automating a ftp job from your local system to a unix system... hmm... unless your .csv's are uniquely timestamped it might not work in your favor. you can always cd into the folder from command line (windows) and then ftp to the remote server. use the options:
Code:
prompt
mput *

or use a ftp tool like filezilla (i usually suggest this to any users who are non-tech savvy as it has a gui interface) and drag and drop.

this is untested as I just wrote it, but more or less should work from a unix system but you will have to adjust it for your needs:

Code:
#! /usr/bin/ksh

ftp=/usr/bin/ftp

PD=<local directory> 
TS=`/usr/bin/date +%Y%m%d`

$ftp -inv <host> <<__EOFTP > path/to/log/ftp.$TS.log 2>&1
user <username> <password>
lcd $PD
cd <path to directory>
ascii <or use whichever format you want
put `<filename>`
bye
__EOFTP

but keep in mind that is only for a specific filename. you would have to use
Code:
 prompt and mput

if you are importing or getting all files from that folder.

be sure to try this out manually first line by line prior to making this a consistent job.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to upload to the unix server?

I am having problems uploading files to my new server. I am new at this so im sure im doing it wrong. I tried using wsftp but that didnt work. please help me!! (4 Replies)
Discussion started by: rdog157h
4 Replies

2. Shell Programming and Scripting

stuck in perl cgi to upload a file to server

hi, i m working on a perl cgi script which uploads a file to the server. i m stuck. i hav written the errors. plz help. Sachin Kaw ______________________________________________________________________ #!/usr/bin/perl -w use CGI; use CGI qw(:standard); use strict; use POSIX... (4 Replies)
Discussion started by: sachin_kaw
4 Replies

3. Shell Programming and Scripting

upload excel file contents to server

Hi I have an excel file with only 5 rows .I want to uplaod those 5 rows to a database using a shell script.Is this possible.If so where do i start. Thnks (1 Reply)
Discussion started by: magikminox
1 Replies

4. UNIX for Advanced & Expert Users

Commands to copy a tar.gz file from a Remote Unix Server to Local Desktop.

Hi, Just wanted to know, how can I ftp/transfer/copy a (design.tar.gz) archive from a Unix Server (sdmc222.sdmc.cp-srv.com) which is at a remote location, to my Windows Desktop. Obviously, it is not possible at cmd prompt on my Windows using the following commands :- ftp... (3 Replies)
Discussion started by: marconi
3 Replies

5. Shell Programming and Scripting

upload file to webdav server

Hi all i have a such question this is my shell script my script must upload file to webdav server ////////////////////////////////////////////////////////////////////////////////////////////////////////////// #!/bin/sh ###... (1 Reply)
Discussion started by: knut
1 Replies

6. Shell Programming and Scripting

Upload files from desktop to unix through FTP

Hi , I want to upload some files from my desktop to unix server through FTP . The list of files are in a text file .Please suggest how to do it through scrip . Thanks in advance .. Anupam (8 Replies)
Discussion started by: anupamhalder
8 Replies

7. Shell Programming and Scripting

Script to upload latest file to other server via FTP

Hello, I have a script that finds the latest version of a file in a folder on my Minecraft server. I'm trying to come up with something that will then FTP that file over to my fileserver. Here's what I have that finds the newest file: find /home/mc/archive/sbhouse -type f -mtime +45 -exec... (7 Replies)
Discussion started by: nbsparks
7 Replies

8. Shell Programming and Scripting

Generate file and Upload to SFTP server.

Xperts, My requirement is something like this, I have a sql script which i need to embed in a shell. The sql (oracle) script will generate a .csv file in some Unix directory. the approximate file size is around 10 mb which i need to upload to an sftp server. My concern here is how to make... (5 Replies)
Discussion started by: Showdown
5 Replies

9. UNIX for Dummies Questions & Answers

scp to get a file from windows desktop to UNIX server

Hi, I want to use scp to upload file to my unix server. i am using this: scp D:\testr.txt unixuser@unixhost:/path it returns an error: ssh: D: host/servname not known i am not sure how to tell path of my D drive in the command and how will command understand it has to pick from my... (5 Replies)
Discussion started by: Kohli
5 Replies
PSC(1)							      General Commands Manual							    PSC(1)

NAME
psc - prepare sc files SYNOPSIS
psc [-fLkrSPv] [-s cell] [-R n] [-C n] [-n n] [-d c] DESCRIPTION
Psc is used to prepare data for input to the spreadsheet calculator sc(1). It accepts normal ascii data on standard input. Standard out- put is a sc file. With no options, psc starts the spreadsheet in cell A0. Strings are right justified. All data on a line is entered on the same row; new input lines cause the output row number to increment by one. The default delimiters are tab and space. The column for- mats are set to one larger than the number of columns required to hold the largest value in the column. OPTIONS
-f Omit column width calculations. This option is for preparing data to be merged with an existing spreadsheet. If the option is not specified, the column widths calculated for the data read by psc will override those already set in the existing spreadsheet. -L Left justify strings. -k Keep all delimiters. This option causes the output cell to change on each new delimiter encountered in the input stream. The default action is to condense multiple delimiters to one, so that the cell only changes once per input data item. -r Output the data by row first then column. For input consisting of a single column, this option will result in output of one row with multiple columns instead of a single column spreadsheet. -s cell Start the top left corner of the spreadsheet in cell. For example, -s B33 will arrange the output data so that the spreadsheet starts in column B, row 33. -R n Increment by n on each new output row. -C n Increment by n on each new output column. -n n Output n rows before advancing to the next column. This option is used when the input is arranged in a single column and the spreadsheet is to have multiple columns, each of which is to be length n. -d c Use the single character c as the delimiter between input fields. -P Plain numbers only. A field is a number only when there is no imbedded [-+eE]. -S All numbers are strings. -v Print the version of psc SEE ALSO
sc(1) AUTHOR
Robert Bond PSC 7.16 19 September 2002 PSC(1)
All times are GMT -4. The time now is 12:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy