Search found 6 matches

by jap
14 Oct 2019 10:03
Forum: DOS Batch Forum
Topic: date not showing
Replies: 3
Views: 10580

Re: date not showing

I recommend you using the date independently of the region day/month order, you can use "WMIC os GET LocalDateTime" as a source, since it's in ISO order: @echo off for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' set ldt=%%j s...
by jap
11 Oct 2019 13:00
Forum: DOS Batch Forum
Topic: date not showing
Replies: 3
Views: 10580

date not showing

Hi,

any idea why the date does not show up in one pc? other pc when i run this batch included in my script it runs fine

@echo off

for /F "tokens=2" %%i in ('date /t') do set mydate=%%i
set mytime=%time%
echo Current time is %mydate%:%mytime%

turned off uac
pc's running on windows 10
by jap
07 Aug 2017 14:12
Forum: DOS Batch Forum
Topic: wait for website to load before running a script
Replies: 2
Views: 4769

wait for website to load before running a script

Hi, I need help on this. Im running on Windows 10 / IE 11. Here's a part of the script inside my batchfile. I would like for the website to load first before running any other script, BUT in this case website is not loading but it already jumps to the "Page load successfully!" IELink= &quo...
by jap
28 May 2017 17:16
Forum: DOS Batch Forum
Topic: user input then echo another variable
Replies: 5
Views: 4836

Re: user input then echo another variable

im smiling while typing this hahaha i was insisting to do set whereas echo is easier lol thanks everyone edit - i was able to use the array function @echo off setlocal EnableDelayedExpansion set "empstatus=Invalid Choice" set /p employeestatus=Set Employeee Status (Active/Terminated/LOA/Re...
by jap
28 May 2017 09:40
Forum: DOS Batch Forum
Topic: user input then echo another variable
Replies: 5
Views: 4836

Re: user input then echo another variable

There's a value for each status and I would be better for them just to type in active, terminated or loa instead of those strings. Active = 1234-active-1234 Terminated = 5678-terminated-5678 LOA = 0000-LOA-0000 So instead of them inputting "1234-active-1234" for "active" I want t...
by jap
27 May 2017 09:03
Forum: DOS Batch Forum
Topic: user input then echo another variable
Replies: 5
Views: 4836

user input then echo another variable

Hi, I'm new to the forum. Trying to do this for 2 days already I already have a solution but if there's a shorter workaround that would be fantastic. User will input a choose a status - that status already has dedicated variable and i like to show that dedicated variable instead of the user input Th...