FTP Between UNIX & Windows drops leading blanks


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users FTP Between UNIX & Windows drops leading blanks
# 1  
Old 02-14-2005
FTP Between UNIX & Windows drops leading blanks

I am using ftp on Solaris to transfer files to Windows 2000 that have leading blanks in the name (ex. " 12345A4444.BIN"). When they get to Windows the leading blanks are stripped off. Has anyone encountered this and is there a fix? If I use Hummingbird it is ok but that is not an option for this application.
# 2  
Old 02-14-2005
how do you transfer the file(s)?
what's the exact syntax of the command you're using?
# 3  
Old 02-14-2005
Generally I am just using an mput * from a script because there could be one or 100 files. I did try and use a put with the name in quotes but windows still stripped the leading blanks. A windows support person here told me that it will strip leading blanks and that I might be able to escape the blanks to preserve them but he could not remember what that escape sequence was.
# 4  
Old 02-14-2005
I was able to 'get' a file with blanks: originating from Windows and get-ting it from Sun/Solaris. I understand it's a different "direction", but....

You can try to "escape" your blanks with '\':
\ \ \twoBlanksBefore.txt
# 5  
Old 02-14-2005
I tried the \ but that just changed the directory the file got put into.
# 6  
Old 02-14-2005
worf52 !

I tried the reverse ... ;
From windows to unix (AIX) and mget *xyz
where xyz file is having leading spaces.

It works good.

You may try that option.
# 7  
Old 02-15-2005
Hi worf52 !

I successfully ftped two files "a file.txt" and " afile.txt" from UNIX <=> DOS
Yes. File name should be within double-quotes.
Didn't try mget / mput.

One more point is , I had used psftp !

hth

Vetri
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Leading blanks

Hi Ich have a list as follows 73 5 100 45 81 4 and I would like to have an output (on screen) like that 73 5 100 45 81 4 (6 Replies)
Discussion started by: lazybaer
6 Replies

2. Shell Programming and Scripting

Clearing leading and trailing blanks from a string in C Shell

Does anyone know of a way with C Shell that will work on both Linux and Sun to clear all leading and trailing blanks from a previously specified string? I am using the following code to replace blanks with underscores: set Company = `echo $Company | sed 's/ /_/g but I don't want any... (1 Reply)
Discussion started by: phudgens
1 Replies

3. Shell Programming and Scripting

FTP from windows to unix server using unix shell script

Hi, Is it possible to ftp a huge zip file from windows to unix server using unix shell scripting? If so what command i need to use. thanks in advance. (1 Reply)
Discussion started by: Shri123
1 Replies

4. Shell Programming and Scripting

UNIX script to FTP file from UNIX server to windows

Hi, I am new to this subject.....Can someone please help me out with the script... unix usernm "sdhftst" unix pwd "chsd13" windows usernm "dfghtst" windows pwd "chsd13" path..../xxx/xxxxx/xxxxxx/xxxxxxx please can u get me a script...its only one file to get ftp. Thanks... (2 Replies)
Discussion started by: himakiran9
2 Replies

5. AIX

Do I need to configure my local windows to FTP files from local windows to a UNIX AIX server?

Hi Friends, I have this script for ftping files from AIX server to local windows xp. #!/bin/sh HOST='localsystem.net' USER='myid_onlocal' PASSWD='mypwd_onlocal' FILE='file.txt' ##This is a file on server(AIX) ftp -n $HOST <<END_SCRIPT quote USER $USER quote PASS $PASSWD put $FILE... (1 Reply)
Discussion started by: rajsharma
1 Replies

6. Shell Programming and Scripting

FTP Windows to Unix

Hi, I am trying to run the following in a bat file. It works fine as stand alone commands ]ftp.exe<linux box> <user> <password> ascii delete PRICES.TXT lcd "C:\Documents and Settings\PCLE12661\Mes documents\Emulation\Dax Prices" cd /home/dsdev/other/in put PRICES.TXT bye pause ... (2 Replies)
Discussion started by: clarcombe
2 Replies

7. UNIX for Dummies Questions & Answers

FTP thru Unix doesn't auth usrname & pswd, but Windows app does - why?!

Strange one this... One of our contacts switched FTP servers, a different IP and now using port 2121 instead of 21. Changed the details in a Windows application using the username & password provided and it works no problem. Tried to FTP through Unix and although I can connect to the... (2 Replies)
Discussion started by: macca74
2 Replies

8. Shell Programming and Scripting

ftp from windows to unix using a perl script on unix machine

i need to ftp a file from windows to a unix machine by executing a sript(perl/shell/php) from that unix machine.i can also use HTML and javascript to build forms. (3 Replies)
Discussion started by: raksha.s
3 Replies

9. Shell Programming and Scripting

excel drops leading zeros while attaching through unix

HEllo All, when the data file is being attached and mailed as file1.csv, the column data( e.g: 88E00, 99E00, 77F12, 66H18). The data 88E00 and 99E00 is being converted to 88E+01, 99E+01. All other data is fine. I need the file attached as .csv from unix only. Is there a way we can manage... (2 Replies)
Discussion started by: OSD
2 Replies

10. IP Networking

UNIX OS & Windows XP

Hello, Can someone please tell me if it is possible to install a Unix Os on a system that already has a Windows XP? If so, how do i go about it doing it?: (6 Replies)
Discussion started by: Ike
6 Replies
Login or Register to Ask a Question