Operating System - HP-UX
1753731 Members
4764 Online
108799 Solutions
New Discussion юеВ

Re: ftp rename multiple files beginning with a leading .

 
Links Moodley
Advisor

Re: ftp rename multiple files beginning with a leading .

I cannot ftp the files without the leading . as the target system attempts to grab the file almost immediately therefore they suggested I create with leading . as the grab will ignore the leading .
Prasanth V Aravind
Trusted Contributor

Re: ftp rename multiple files beginning with a leading .

Totaly confused !!!!

okey ... pls provide the data for these..

what is files name in unix box ?? is it .639622018_001368083_4E1_20100506080500000_TP217.xml or with out dot (.) ??
do you want to add or remove dot ??
when you want to add/remove dot ??


Else can you saher the script with us?

Gudluck
Prasanth
Links Moodley
Advisor

Re: ftp rename multiple files beginning with a leading .

the file name on the unix before the ftp is with a leading . like .639622018_001368083_4E1_20100506080500000_TP220.xml.
The rename must take place on the Windows server after the ftp has been done.
Prasanth V Aravind
Trusted Contributor

Re: ftp rename multiple files beginning with a leading .

No Moodley ... you can't do it from your unix box... you can go for any bach script or perl script hosted on windows box..

I will suggest to try for perl script... But i am very new in perl .. so can't help you much..


still i try for my level best

:)

Gudluck
Prasanth
Links Moodley
Advisor

Re: ftp rename multiple files beginning with a leading .

Thank You Prasanth for your help thusfar.
Steven Schweda
Honored Contributor

Re: ftp rename multiple files beginning with a leading .

> [...] I then need to rename both the files
> with one command [...]

> I need to rename in one go.

Why "with one command"/"in one go"? I can't
think of any rename command (on any OS) which
will rename two files in this way at exactly
the same time.

Assuming that this (unspecified) Windows FTP
server supports a rename operation (Does
it?), then what would be the problem if you
renamed two files in two rename operations
instead of one?

> [...] the routine on the remote server
> grabs the file almost instantly [...]

That would seem to be your real problem.

In many cases, it's easier to leave the file
names unchanged, but put the files into a
different (unwatched) destination directory,
and then, after they've been transfered, move
(rename) them into the desired (watched)
destination directory. But, unless you
rename the whole directory, I see no way to
move/rename multiple files simultaneously.
(But I also don't understand the need to do
so.)