spartacus
13th December 2006, 16:41
Hi,
I'm using a ftp-script to download some files from Baan-Server, which works fine, so far.
But now I have to put an extension to the downloaded files. Is there any possibility to rename a file FROM THE FTP CLIENT directly after download?
I ask this, because the ftp-script is generated. The filenames differ and the only place where the complete filenames are present, is during ftp-download.
jp.aalders
13th December 2006, 16:56
Maybe c-kermit can help you. It offers various options for using ftp
See: http://www.columbia.edu/kermit/ck80.html
Regards,
JP
mark_h
13th December 2006, 18:10
Well if you are running ftp on the client pc you can check to see if it has a rename command in it. I know from my pc I can log onto the server and use rename to change the file name on the server.
jp.aalders
13th December 2006, 18:24
You're right Marc,
But this is a manual process, c-kermit offers possibillities to automate these kind of actions.
regards,
John
mark_h
13th December 2006, 18:58
I ask this, because the ftp-script is generated.
Yes - you could be correct. What I saw was the above statement and thought if the script is generated containing the filenames why not just try the rename option. Of course if he is doing something with wildcards then this probably would not work.
spartacus
14th December 2006, 10:51
Thanks a lot for your proposals so far.
I don't know, if you understood right (or if I explained right ;-)
The first thing is: I have to change the name, at the client, after download. This is because I load down Baan-Source and attach it via hyperlink to some documentation. To use a "windows known" extension I would like to add the extension "*.txt" to the Baan sources --> this is the rename!
For download I have one batch, where I start the "ftp -s %1...." and read an, with awk generated, parameterfile which tells the ftp what to download. All path/filenames are explicit, no wildcards!
I hope this is more clear now.
Anyway I will take a look to the ckermit (used it some years ago with my HP48 calculator :-)
mark_h
14th December 2006, 17:33
Thanks a lot for your proposals so far.
I don't know, if you understood right (or if I explained right ;-)
I think it is me - but on I go. :)
For download I have one batch, where I start the "ftp -s %1...." and read an, with awk generated, parameterfile which tells the ftp what to download. All path/filenames are explicit, no wildcards!
See this is where I get hungup - if you generate the script that goes in %1 why can't you just include a "!move" of the file inside the script? Rename was for the server, but to do it on the local client running the script the "!" command executes a local command(so you could use for windows client !move or !copy).
Am I over simplifying something?
spartacus
15th December 2006, 10:47
Hi Mark,
now, I know what you mean. But aren't I restricted to ftp statements in this script?? Thought so, because it's a parameter for "ftp".
But I will try it.
Greetings and thanks
NirajKakodkar
15th December 2006, 16:14
Hi ,
From your discusion above what i understood was , you are getting a file from server to your client using some batch file .
So probably the batch file contents will be something like
get ABC ABC
what you could do is
get ABC yourname.txt
Is it all you want or I didnot understood it probably
Regards ,
Niraj
mark_h
15th December 2006, 16:41
:) Even better. :) Whats funny is my help only showed "get filename", so I just assumed (yes I know that is bad) that your format did not work.
spartacus
15th December 2006, 17:36
Hi Niraj,
even if I agree with Mark, what you wrote is not menthioned in the help of the ftp-client ....... BUT IT WORKS!!
Great, thank you. To change the script for that will be easily done :D
NirajKakodkar
18th December 2006, 09:54
hi ,
Any time experts , :)
Regards,
Niraj