Home
Join

3 Replies

  • It is an extremely bad practice to put passwords into a plaintext file of any kind.  I highly discourage this.  In today's cybersecurity environment, this is a major no no.

    PowerShell has some better credential handling than batch.  You have some PowerShell mixed in with your batch file.  Why not make it all PowerShell?

    You need the script to log into the servers how?  You haven't specified that either.

    I realize I'm not answering your direct question very well.  I don't think you are pursuing the proper solution.

    Spice (1) flagReport
    Was this post helpful? thumb_up thumb_down
  • Thank you for your answer JDDellGuy.
    The script will log into FTP sites, and the script and the text file will be stored safely, but if you think that PowerShell will manage this for me, why not provide me details or links so I can read about it.
    Meanwhile, If you can provide me also with how to do the loop in the batch script to read credentials from a text file to log in to FTP sites, to get the filenames ONLY, as this script did my needs.
    But because I have about 40 FTP directories, I decided to make the loop in the batch file as described above.
    Was this post helpful? thumb_up thumb_down
  • This article explains how to use FOR in a batch file to iterate through multiple components of a text file.  You will need to know what the delimiter in your text file is, and you will probably need to format your text file such that each server's data is found in a single row.  A CSV file may work well for that.

    https://ss64.com/nt/for_f.html

    This is an article which gives some information on FTP transfers in a batch file.

    https://www.jscape.com/blog/using-windows-ftp-scripts-to-automate-file-transfers

    As far as the text file of passwords being stored securely...if it's a plaintext file with passwords in it, that's not secure.  Just saying.

    Was this post helpful? thumb_up thumb_down

Read these next...

  • No Network Access

    No Network Access

    Networking

    Hello,Suddenly, my Windows 2012R server has NO network access through either of its two nic cards; it is a DELL PE T430. It is configured to get IP info from DHCP, and that works ok; both NICs can get an IP just fine, but after I get the IP address,  I am...

  • Understanding VPNs

    Understanding VPNs

    Security

    Hello I'm trying to learn the concept of VPN's and there's some aspect of VPN's I'm not sure about. When I configure a remote access VPN on a Fortigate, I configure the following client range 192.168.3.10-192.168.3.40When the client connects and I do a ro...

  • Snap! Outlook crashes, getting phished, supermoon, CyberOne, DALL·E 2 + SpiceRex

    Snap! Outlook crashes, getting phished, supermoon, CyberOne, DALL·E 2 + SpiceRex

    Spiceworks Originals

    Your daily dose of tech news, in brief. We made it to Friday! Before we consider our weekend plans, let's look back in time. While not the storage we're accustomed to, back on August 12, 1877 (although there appears to be some debate on the actual ...

  • Spark! Pro series – 12th August 2022

    Spark! Pro series – 12th August 2022

    Spiceworks Originals

    I want my… I want my…. Spark!    Just a reminder, if you are reading the Spark!, Spice it up. We like it spicy here! Today in History: The IBM PC Introduced August 12, 1981 IBM introduces its ...

  • Repeated Attacks on my Firewall - What to Do ??

    Repeated Attacks on my Firewall - What to Do ??

    Security

    I've got a UTM Firewall and I'm constantly getting notifications that someone is trying to gain access through an SSL-VPN. The attacking IP address is almost always different, so blocking the IP every time is not a sustainable solution. They haven't got t...