Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: copy from drive with password  (Read 2247 times)

0 Members and 1 Guest are viewing this topic.

wwise

    Topic Starter


    Newbie

    copy from drive with password
    « on: November 07, 2008, 10:01:28 AM »
    Hi everyone - I'm new to batch files and need some help copying files from a folder that has a password associated with it.

    I am trying to copy all files from an ftp://FTP://SFTP.URL.COM to a \\dir\project\folder

    I have tried cd to the ftp site but that doesn't work.  Any ideas?  Can I pass a user name and password with it?  will xcopy work once I get in?

    Any help is appreciated!

    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: copy from drive with password
    « Reply #1 on: November 07, 2008, 02:57:40 PM »
    In addition to your batch file, it might be easier to setup a FTP script. FTP is a shell program with it's own instruction set.

    Quote
    Can I pass a user name and password with it?  will xcopy work once I get in?

    Name and password, Yes. XCOPY, No.

    This link may help you out.

    Good luck. 8)
    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein

    wwise

      Topic Starter


      Newbie

      Re: copy from drive with password
      « Reply #2 on: November 10, 2008, 06:40:56 AM »
      Wow!  That is very helpful!  So now I have a script that launches the FTP script to get all the files in the directory and then deletes everything.  But...what if a user posts a new file while I am getting the others?  Is there a way to delete the FTP files only if they have a timestamp before I started the get?

      Sidewinder



        Guru

        Thanked: 139
      • Experience: Familiar
      • OS: Windows 10
      Re: copy from drive with password
      « Reply #3 on: November 10, 2008, 01:13:17 PM »
      Quote
      But...what if a user posts a new file while I am getting the others?  Is there a way to delete the FTP files only if they have a timestamp before I started the get?

      You might need a smarter FTP client than the one Windows provides. ;D

      Do all the files have the same extension? If so you may be able to change the extension of all the available files, use mget *.ext to download all the files with the new extention, then use mdelete *.ext to delete the files. Any file not named with the new extension would not get processed until the next cycle.

      You might also get a dir list from the remote computer, then download and delete each file by name.

      Good luck.  8)
      The true sign of intelligence is not knowledge but imagination.

      -- Albert Einstein