LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 07-06-2005, 01:54 PM   #1
mrobertson
Member
 
Registered: May 2005
Posts: 275

Rep: Reputation: 30
Recieving a blank file during ftp session


I have the following ftp command coded and saved as c:\ftp.cmd:

Code:
open pl7cam3
root
pass
cd etc
put camdata
I am trying to ftp a file from windows to a network camera's hardrive (etc directory). The file that I am trying to send is camdata which resides in the c:\ directory of windows. Camdata is populated by a vb6 program. The code above will execute the transfering of the file, but sends a blank file. When I try to open the file from the camera it is blank, yet when I open it from windows it is populated. Does anyone see what the problem may be here?
 
Old 07-06-2005, 01:58 PM   #2
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
Just a thought, but maybe your current local directory is not c:\ when it is executed. Have you tried replacing the put with something like:

put c:\camdata camdata
 
Old 07-06-2005, 02:19 PM   #3
mrobertson
Member
 
Registered: May 2005
Posts: 275

Original Poster
Rep: Reputation: 30
That did the trick! Thank you very much for you help.
 
Old 07-06-2005, 02:26 PM   #4
mrobertson
Member
 
Registered: May 2005
Posts: 275

Original Poster
Rep: Reputation: 30
Maybe you could answer one last question for me. I have a script running that will read and print out this file that I am ftp 'ing. Right now I am using the following code:

Code:
#!/bin/sh
while sleep 1
      do
            cat camdata
done
And this code will print it out each time over and over again taking up multiple lines. The file is four lines of text. Is there anyway to just print the 4 lines and then when it comes time to print again....just print over the previous four lines so that there is always only 4 lines of text printed instead of 4 then 8 then 12 then 16.....etc?
 
Old 07-06-2005, 02:31 PM   #5
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
Hmmm... The easiest way might be just to add a clear before the cat.

Code:
#!/bin/sh
while sleep 1
      do
            clear
            cat camdata
done
Obviously that will clear the whole screen each time.

If that isn't what you want, I think there are some apps you can use from the shell script to position the cursor in your terminal, but I don't know what they are called offhand.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
amsn closes when recieving a file Cyber Maid Linux - Software 2 02-02-2005 10:19 PM
Blank Screen when Run-level set to 5/ Slow X Session nikhil_no_1 Fedora 0 09-16-2004 03:22 AM
How am I recieving blank emails? tarballedtux Linux - General 3 02-21-2004 11:13 AM
Replace blank/almost blank lines in file Wynd Linux - General 3 01-27-2004 05:49 PM
how do i find the FTP session time??? letmein Linux - General 1 08-26-2003 11:25 PM


All times are GMT -5. The time now is 03:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration