/ Sign-up
Your question

UNC paths are not supported.

  • Domain
  • Networking
Last response: in Networking
November 20, 2010 6:02:30 PM

Hi Guys,

(novice inet-admin)

i just need a batch file that read the contents of a folder within an ftp

example address

how do i go about doing this?

More about : unc paths supported

November 22, 2010 1:51:34 PM

Net use X: //blah blah/blah (plus username/password if you need it)
Dir X: (redirect to a file if you want)
Net use X: /delete
November 22, 2010 4:43:34 PM

To build on HT9's example, you can wrap the statement in a FOR command to query additional websites from a file.

First, you would create a file with a list of the websites you wanted to check. Save it as a .txt file. You would also need to download the PSexecTools and add to your path (C:\windows\system32).

Your command to run to check multiple sites might look like this: (Untested, probably needs some additional fixes)

FOR /F %%i in (C:\sites.txt) do PSEXEC //%%i DIR (path) >> (full logfile.txt)

If you can substitute the FTP site for the server name, that would help. If you have Powershell available, this can be done easier and quicker.

This will run through a text file holding the name of the server or FTP path, connect to the machine locally, export the info to a log file (which can be local or remote) and move on to the next until the end of the file (EOF).