mput question


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting mput question
# 1  
Old 03-17-2011
mput question

I want to mput a file without extension, and while doing the mput i want to include the .txt as an extension to the file name. How can i do that?
# 2  
Old 03-17-2011
Quote:
Originally Posted by wizardofoz
I want to mput a file without extension, and while doing the mput i want to include the .txt as an extension to the file name. How can i do that?

There are no extensions in Unix filenames; the suffix, .txt, is as much part of the filename as the part before the period.

The only way to do it without including the suffix is to use a wildcard:
Code:
mput xxxx*

# 3  
Old 03-17-2011
I don't think you can achieve this without lateral thought.

One option is to copy each source files to .txt extension before starting the ftp session and issuing the "mput".

Another option is to generate the code to use multiple "put" statements which specify each source and destination filename instead of issuing a single "mput". This is my preferred method. Remember that if you want an ascii transfer to specify the "ascii" command to ftp.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Second try mput failed

I'm having few doubts with below questions not able figure out the reason: mput operation used via shell script failed with 550 code return from FTP - "Overwrite cannot be done". ( Having all permissions to this directory ) but why got failed. When trying to run the script again but now it... (3 Replies)
Discussion started by: Gautham
3 Replies

2. Shell Programming and Scripting

.netrc does not execute mput command

Hi all :D i' ve a script running on freebsd system: echo "Start FTP Transfer" cd /tmp/elaboralog ftp -i 192.168.27.147 2100 > /tmp/elaboralog/ftp_log_phase2That call .netrc machine 192.168.27.147 login user password 12345 macdef backup binary cd tmp/elaboralog mput *-file.txt... (19 Replies)
Discussion started by: mirrorx
19 Replies

3. UNIX Desktop Questions & Answers

How to grep and pipe to mput ftp

I am ptting the following into an FTOP script. date=`TZ="aaa24" date +'%Y%m%d'` # this gets Yesterday date . . . . mput < 'l | grep $Vdate' # the idea to grep a listing from a directory that has yesterday date in its file name then put it in the remote FTP server. How can I get it... (4 Replies)
Discussion started by: raouf@comcast.n
4 Replies

4. Shell Programming and Scripting

SFTP - 'put' doing an 'mput'

Hi guys, I'm having a problem with F-Secure Unix. When I try a simple command; sftp> put local.test remote.test I expect that the local file local.test would be copied to the remote file remote.test However sftp is attempting to copy local.test & remote.test from the local machine, as if... (2 Replies)
Discussion started by: b0bbins
2 Replies

5. Shell Programming and Scripting

mput is not working in ftp script

1)In this script mput command is not working( not transfering multiple files, it is able to send single file) 2)here is the script to automate the ftp process . 3)for transfering files from one machine to other machine using ftp can anyone can give me the solution in this issue Script is... (6 Replies)
Discussion started by: gsri
6 Replies

6. Solaris

FTP limits - mput *

I am trying to upload via FTP 11,000 files in a Solaris 8 system. I am using Windows 2000 and its FTP client to upload the files. The command used is mput *.jpg.When the quantity of files reaches 10,000 the upload aborts. Is this problem related with the FTP client ? If yes, another FTP client... (2 Replies)
Discussion started by: waldecy
2 Replies

7. UNIX for Dummies Questions & Answers

Question

hallo, ik heb hier een vraagje. hoeveel gebruikers kunnen er op 1 unix systeem. hopelijk antwoorden golle nu want ik moet da vinde voor school en die leerkracht zaagt. :p groetjes eu wacht wa was mijne nick ah ja vraagje groetjes vraagje ik kan geen engels dus antwoord liever in het... (1 Reply)
Discussion started by: vraagje
1 Replies

8. UNIX for Dummies Questions & Answers

mget and mput...

hello, i was interested in knowing if you can mget or mput a sequence of files: example- say i have a dir with 1000 files with the same extension e.g. *.sgi, is there a way to mget only the last 200 files? i would assume that there is a flag i would use, or something like: mget... (14 Replies)
Discussion started by: yoyomamma
14 Replies
Login or Register to Ask a Question