How to get the current path using VBScript

To get the current path using VBScript you can use the snippet below.

Samples

VBScript Sample

If you have any questions or suggestions feel free to rate this snippet, post a comment or Contact Us via Email.

Related links:

Please rate this snippet

How to load project references from a sub directory in C# and VB.NET

To load project references from a sub directory in C# and VB.NET you simply need to add the element to your app.config file.

  • assemblyBinding: Contains information about assembly version redirection and the locations of assemblies.
  • configuration: The root element in every configuration file used by the common language runtime and .NET Framework applications.
  • runtime: Contains information about assembly binding and garbage collection.
  • Sample XML

    <configuration>
       <runtime>
          <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
             <probing privatePath="bin;bin2\subbin;bin3"/>
          </assemblyBinding>
       </runtime>
    </configuration>
    

    Please rate this snippet

    How to get the path of the active app.config file in C# and VB.NET

    To get the path of the active app.config file in C# and VB.NET you can use the following snippet

    Sample C#

    AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
    

    Sample VB.NET

    AppDomain.CurrentDomain.SetupInformation.ConfigurationFile
    

    Please rate this snippet

    How to read a file to string in Java

    To read a file to string in Java you can use the following snippet.

    Sample Java

    public static string readFileToString(FileInputStream _fileInputStream)
    {
    	try {  
    		DataInputStream dataInputStream = new DataInputStream (_fileInputStream);  
    		byte[] Bytes = new byte[dataInputStream.available ()];  
    		dataInputStream.readFully (Bytes);  
    		dataInputStream.close ();  
    		String result = new String (Bytes, 0, Bytes.length, "Cp850");  
    		return result;  
    	}  
    	catch (Exception e) {  
    		e.printStackTrace();  
    		return "";
    	} 
    }
    

    Please rate this snippet

    How to check if a file exists in C++

    To check if a file exists in C++ you can use the following snippet.

    Sample C++

    #include <sys/stat.h>
    
    inline bool fileExists (const std::string& fileName) {
    	struct stat buff;   
    	return (stat (fileName.c_str(), &buff) == 0); 
    }
    

    Please rate this snippet

    How to set the start location of FolderBrowserDialog in C# and VB.NET

    To set the start location of FolderBrowserDialog in C# and VB.NET you can use the following snippet.
    To do so, simply set the SelectedPath Value to the path you want.

    Sample C#

    MyFolderBrowserDialog.SelectedPath = @"C:\Test";
    

    Sample VB.NET

    MyFolderBrowserDialog.SelectedPath = "C:\Test"
    

    Please rate this snippet