Posts

Showing posts with the label cmd

Sharing PATH Variable Windows Subsystem for Linux (WSL) [on hold]

Sharing PATH Variable Windows Subsystem for Linux (WSL) [on hold] So I am trying to link the PATH variables for Java (and Python) to the Windows Linux bash shell I've tried following the directions on here: https://blogs.msdn.microsoft.com/commandline/2017/12/22/share-environment-vars-between-wsl-and-windows/ for /p with the path that I already have on windows: C:Program Files (x86)Common FilesOracleJavajavapath C:Program Files (x86)Common FilesOracleJavajavapath I did everything the same except first define TRANSLATABLEPATH as my the linux mnt path and then when im in cmd, the windows path What am I doing wrong? Edit: See comment but I basically set TRANSLATABLEPATH and export WSLENV=TRANSLATABLEPATH/p Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit th...

Unable to stop and start tomcat server properly using batch file

Unable to stop and start tomcat server properly using batch file Hi I have a problem with the below commands. REM : Start server C: cd C:Apache Software Foundationapache-tomcat-7.0.22bin CALL shutdown.bat cd C:Apache Software Foundationapache-tomcat-7.0.22webapps RMDIR ProjectWAR /S /Q DEL ProjectWar.war cd C:Apache Software Foundationapache-tomcat-7.0.22bin catalina jpda start I am trying to shutdown the tomcat server, then delete the project folder and war file and then again start the tomcat server. But if I run the above code, server is getting shutdown, then only war file is getting deleted (not the projectWar folder) and nothing else. Please help me. Do you see any errors when the file runs the RMDIR ProjectWAR /S /Q ? – theglossy1 Feb 11 '15 at 16:12 RMDIR ProjectWAR /S /Q Maybe there are some files l...

Batch script doesn't run, although its code runs in CMD

Batch script doesn't run, although its code runs in CMD I was looking for an easy way to get the system volumes info in GB (batch) so I got this: for /f "tokens=1-3" %a in ('WMIC LOGICALDISK GET FreeSpace^,Name^,Size ^|FINDSTR /I /V "Name"') do @echo wsh.echo "%b" ^& " free=" ^& FormatNumber^(cdbl^(%a^)/1024/1024/1024, 2^)^& " GiB"^& " size=" ^& FormatNumber^(cdbl^(%c^)/1024/1024/1024, 2^)^& " GiB" > %temp%tmp.vbs & @if not "%c"=="" @echo(& @cscript //nologo %temp%tmp.vbs >> c:testtest2.txt | type C:testtest2.txt It works fine if I just copy and paste it to the CMD but if I run it from a .bat file it just don't do anything. What could I be doing wrong? PD: I can't use PowerShell, I need it in batch. That's not batch, it's a fruitless attempt to write vbs in a single line pass values to it wrap that in ...