1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Log file of FTP Transfer

Discussion in 'Software Development' started by WAJ0606, Apr 15, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. WAJ0606

    WAJ0606 Thread Starter

    Joined:
    Oct 10, 2007
    Messages:
    137
    I have several databases that automatically generate reports, do some formatting and then ftp those reports to a web server via a .cmd file that calls a .dat file.

    Sometimes the ftp fails and I need a way to quickly check that in the morning vs. looking at the modified date of the files on the web server. Is there a way I can log the ftp session...basically everything that flashes on the screen.

    Also, instead of specifying the server and password in every file, is there a way I can create the password in one location and call it as a variable? (so when the password has to be changed I can change it in only one place)

    Thanks in advance,
    wj
     
  2. lotuseclat79

    lotuseclat79

    Joined:
    Sep 12, 2003
    Messages:
    20,583
    Hi WAJ0606,

    See Configuring Logging for ftp.

    Write a script to automate the password/server access would be my guess on the ftp command. Look up the documentation for ftp man page on the Internet on how to include the password on the ftp command.

    -- Tom
     
  3. WAJ0606

    WAJ0606 Thread Starter

    Joined:
    Oct 10, 2007
    Messages:
    137
    Logging is my biggest issue, I didn't understand the instructions on the link you sent. I want to log into a text file what's occurring in the command prompt window.

    As for the password thing, it automatically logs on via an .dat file. There are several of these files each corresponding to a different folder. I want to be able to call the password from within that .dat file, so when it comes time for the password to change I only have to change it in one place.
     
  4. WAJ0606

    WAJ0606 Thread Starter

    Joined:
    Oct 10, 2007
    Messages:
    137
    The actions of these files are what I am trying to log...(the cmd calls the .dat)
     

    Attached Files:

  5. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,786
  6. WAJ0606

    WAJ0606 Thread Starter

    Joined:
    Oct 10, 2007
    Messages:
    137
    I ran across that same page yesterday afternoon sometime, the echo statement only returns the phrase "Start of download." The phrase ">>ftp.log" at the end of the ftp line is what logs the ftp session and it works when I run the batch file manually. However, when I run it from Access it doesn't work.
    For Example:
    running from Access...ftp works, but logging doesn't =start /wait "" ftp -s:g:\Optical_Customer_OB\Format\ftp2web2.dat ztcfd013 >>file.txt

    running from Access...logging does, but ftp doesn't=ftp -s:g:\Optical_Customer_OB\Format\ftp2web2.dat ztcfd013 >>file.txt

    Thanks for all your responses thus far. I'm looking for a way around this now...if you have any ideas let me know.
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/703953

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice