If you need tips & tricks, here they are...

Windows Tips & Tricks

How to Find Windows Version, Edition and Build from ISO, DVD or USB.

How to Find Windows Version, Edition and Build from ISO, DVD or USB.

Last updated on December 8th, 2018

If you have downloaded a Windows 10 ISO file in the past and you don't remember which Windows 10 version, edition or build the ISO file contains, then in this article you 'll read the easiest way to find out this information. 

Read more: How to Find Windows Version, Edition and Build from ISO, DVD or USB.

Get current directory

To get the current directory to use inside batch files.

There is a very simple way to get the directory from a batch script file. CD environment variable stores the current directory of a command window session. Just run the command ‘echo %CD%’ and check it yourself.

C:\Users\windmdline>echo The current directory is %CD%
The current directory is C:\Users\wincmdline

Or you can use a much better alternative

%~dp0 is the variable you want.
It outputs the drive and path of the batch file.
EX1: C:\mydir\myfile.bat becomes C:\mydir\
Ex2: @echo off
Set SetupApp=WinaeroTweaker-

%SetupApp% /VERYSILENT /PORTABLE /DIR="%~dp0\wt_portable"
Will create a new directory in the directory where you have the WinaeroTweaker- file called wt_portable and run the WinaeroTweaker- to create a portable extraction of all files.

Here’s a MS reference, it works in thing other than Batch; like VBS SCCM, PS, shortcuts too.

Source: Here!

Please consider supporting our efforts.

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.