Showing posts with label win os. Show all posts
Showing posts with label win os. Show all posts

Monday, June 6, 2022

win os - How to copy all files defined by mask in all subdirectories into one directory

Copy all *.mobi files in current directory and all subdirectories into c:\temp\mobi directory. 
The destination directory must exists.
find . -name \*.mobi -exec cp {} c:/temp/mobi/ \;
UPDATE: Better variant:
for /r %i in (*.epub) do xcopy /Y "%i" c:\temp\mobi

Tuesday, August 25, 2020

Wednesday, January 30, 2019

WIN OS - How to get IP address from MAC address

"arp -a" command display context of actual ARP table.

You could use this code for find IP address by MAC address:


PS: For refreshing ARP cache you can use:
netsh interface ip delete arpcache

Wednesday, September 12, 2018

WIN OS - How check if port is blocked

This commnad will check, if port 1760 is blocked.
netstat -aon | find "1760"
Output:
TCP    127.0.0.1:17600        0.0.0.0:0              LISTENING       7944

Monday, February 5, 2018

WIN OS - How to update client group policy settings

gpupdate /force
Output:
C:\Windows\System32>gpupdate /force
Updating policy...

Computer Policy update has completed successfull
User Policy update has completed successfully.

WIN OS - How get name of connection DC (domain controller)

echo %logonserver%