Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

Check if the file exist inside the URL / website files folder

What to do here?

I aint asking for the code.

I want to check if the files existed in the directory "Users" from an URL ?

Code
if (!File.Exists("localhost/Users/2.2.2.2.2.2)) // This will check if the directory file "2.2.2.2.2.2.2" existed inside the Users directory from the URL localhost then do something if does not exist.
                    {
                        Console.WriteLine("IP Address does not exist!");
                        goto Main;
                        
                    }
(Aug 17, 2015 03:46 AM)SwaggySwampMan Wrote:  What to do here?

I aint asking for the code.

I want to check if the files existed in the directory "Users" from an URL ?

Code
if (!File.Exists("localhost/Users/2.2.2.2.2.2)) // This will check if the directory file "2.2.2.2.2.2.2" existed inside the Users directory from the URL localhost then do something if does not exist.
            {
            Console.WriteLine("IP Address does not exist!");
            goto Main;

            }

You should look into WebRequests. Should be just what you need.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by Eternal BlueMay 14, 2022 04:02 PM 4 228 May 14, 2022 04:02 PM
Last Post: Sajuuk
[C#] by anarchy2009Oct 27, 2020 04:38 AM 9 309 Oct 27, 2020 04:38 AM
Last Post: SaketSaket
[C] by Tr0jandogSep 11, 2019 11:44 AM 0 134 Sep 11, 2019 11:44 AM
Last Post: Tr0jandog