[sourcecode language=”powershell”]

@echo off

FOR /F "skip=1" %%A IN (‘WMIC Path Win32_LocalTime Get DayOfWeek’ ) DO (
set DOW=%%A
goto :continue
)
:continue

if %DOW% EQU 0 goto :week
if %DOW% EQU 6 goto :week
echo Det er hverdag
goto :end

:week
echo Det er weekend

:end

[/sourcecode]

Windows OS supports the conversion of a FAT volume to a NTFS volume without deleting the files on the drive. We can do this using the command convert. You can find syntax below.

convert drivename /FS:NTFS 

Example: To convert E: drive from FAT to NTFS, we can run the below command.

convert E: /FS:NTFS

Adding /X switch forces the command to unmount the volume if required.

@ECHO OFF
SET output=%USERPROFILE%\output.txt
IF EXIST “%output%” DEL “%output%”
FOR /L %%G IN (1, 1, 69) DO (
CALL :ping 192.168.%%G.3
CALL :ping 192.168.%%G.4
)
GOTO :EOF

:ping
ping -n 1 %1 >NUL && ECHO %1>>”%output%”


 

source: http://stackoverflow.com/questions/5037382/batch-file-loop-ping-output-to-file-hosts-that-are-up

 

To run a Control Panel tool in Windows, type the appropriate command in the Open box or at a command prompt.

NOTE: If you want to run a command from a command prompt, you must do so from the Windows folder. Also, note that your computer may not have all of the tools listed in this article, as your Windows installation may not include all of these components.
Control panel tool Command
—————————————————————–
Accessibility Options control access.cpl
Add New Hardware control sysdm.cpl add new hardware
Add/Remove Programs control appwiz.cpl
Date/Time Properties control timedate.cpl
Display Properties control desk.cpl