Created
February 23, 2021 13:28
-
-
Save amitkhare/4ccf61b418d166299ef8bb6173fbdbb9 to your computer and use it in GitHub Desktop.
Opens ftp folder if PC is connected through mobile hotspot and there is an FTP server running on it at port 2221
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
netsh wlan show interfaces | Findstr /c:"Signal" && set "CStatus=true" || set "CStatus=false" | |
for /f "tokens=2,3 delims={,}" %%a in ('"WMIC NICConfig where IPEnabled="True" get DefaultIPGateway /value | find "I" "') do set "location=%%a" | |
set location=%location:"=% | |
echo opening explorer at %location% | |
IF /i "%CStatus%"=="true" explorer.exe ftp://%location%:2221 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment