tag:blogger.com,1999:blog-23021255.post1160767159114505067..comments2008-10-18T07:58:06.773+02:00Comments on Cisco IOS hints and tricks: Copy the text files into router's flash through a ...Ivan Pepelnjakhttp://www.blogger.com/profile/13457151406311272386noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-23021255.post-1293769324559648802008-10-18T07:58:00.000+02:002008-10-18T07:58:00.000+02:002008-10-18T07:58:00.000+02:00Try executing the same command manually from the C...Try executing the same command manually from the CLI to test if it works. It should not generate any prompts, you might have to use <A HREF="http://blog.ioshints.info/2006/11/reduce-noise-generated-by-cisco-ios.html" REL="nofollow">file prompt quiet</A>.Ivan Pepelnjakhttp://www.blogger.com/profile/13457151406311272386noreply@blogger.comtag:blogger.com,1999:blog-23021255.post-50540095771974476322008-10-18T07:34:00.000+02:002008-10-18T07:34:00.000+02:002008-10-18T07:34:00.000+02:00Thank you :)I´m using ftp and the configuration is...Thank you :)<BR/>I´m using ftp and the configuration is ok.<BR/><BR/>Actually, my script is running. But, by the end I would like to copy a file from flash to ftp server and here is the BIG problem of my script.<BR/><BR/>I use this command to do that:<BR/><BR/>if [catch {cli_exec $cli1(fd) "copy flash:test ftp://10.0.0.1"} result] {<BR/> error $result $errorInfo<BR/>}<BR/><BR/>Well, it runs without any kind of error, but in ftp server the file doesn't appear.<BR/>My question is: is it possible to copy from flash to ftp, while inside tcl script running as a policy?<BR/>Should this command works fine, no ? <BR/><BR/>If anyone knows how I can do that copy, please help me.<BR/><BR/>Thanks in advanceAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-23021255.post-21855163079961169002008-10-08T10:07:00.000+02:002008-10-08T10:07:00.000+02:002008-10-08T10:07:00.000+02:00I'm just guessing ... Storing configurations on a ...I'm just guessing ... Storing configurations on a TFTP server is something I do on a regular basis, and I usually overwrite existing files.<BR/><BR/>The problem is probably in the configuration of the TFTP server, which rejects an attempt to overwrite existing files.Ivan Pepelnjakhttp://www.blogger.com/profile/13457151406311272386noreply@blogger.comtag:blogger.com,1999:blog-23021255.post-15500843996634414852008-10-07T21:29:00.000+02:002008-10-07T21:29:00.000+02:002008-10-07T21:29:00.000+02:00Hello,I´m doing a script as well. Every time that ...Hello,<BR/><BR/>I´m doing a script as well. Every time that my script run, it add some data to the flash file that I define.<BR/>I would like to copy the file to tftp server.<BR/><BR/>Well, the question is, I know how to copy it, the problem is when the file already exists in TFTP, ios says that the file already exists... I doesnt know how to overwrite the file in tftp with the new data.<BR/><BR/>Anyone knows if there are any command to do that? or any way to do that?<BR/><BR/>Thanks in advanceAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-23021255.post-32394887596205170472008-09-24T00:01:00.000+02:002008-09-24T00:01:00.000+02:002008-09-24T00:01:00.000+02:00Thank you :)That was very helpfull.Thank you :)<BR/>That was very helpfull.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-23021255.post-57367938494397153192008-09-23T09:37:00.000+02:002008-09-23T09:37:00.000+02:002008-09-23T09:37:00.000+02:00If you want to reopen the file and append more dat...If you want to reopen the file and append more data to it, use a+ instead of w+. <BR/><BR/>See http://tmml.sourceforge.net/doc/tcl/open.html for details.<BR/><BR/>If you want to use more than one "puts" statement, store the channel# into a variable and use that variable in puts. For example,<BR/><BR/>set fl [open ...]<BR/>puts $fl "string"<BR/>puts $fl {string}<BR/>close $fl<BR/><BR/>See also http://tmml.sourceforge.net/doc/tcl/puts.html (examples)Ivan Pepelnjakhttp://www.blogger.com/profile/13457151406311272386noreply@blogger.comtag:blogger.com,1999:blog-23021255.post-85569950372851870582008-09-23T04:00:00.000+02:002008-09-23T04:00:00.000+02:002008-09-23T04:00:00.000+02:00Hello everyone,I am working with a tcl script on c...Hello everyone,I am working with a tcl script on cisco ios. <BR/>This command has been very helpful puts [open "flash:filename" w+] {. <BR/>however how do I use this repeatedly to append more strings into the same file without losing the previous data from the file?<BR/><BR/>Secondly, teh command at the end says input is from a file however can I need to use a tcl variable as the input to the command. How can I do this?<BR/>All suggestions are welcomed. Thank you in advance for all teh help.<BR/><BR/>You can reply back to me at maiyart@msn.comAnonymousnoreply@blogger.com