Friday, August 26, 2011
Monday, August 8, 2011
Delete folder with long path
http://www.windowsitpro.com/article/jsifaq/jsi-tip-9651-how-can-i-delete-a-folder-that-returns-path-too-long-
When you attempt to delete a folder and receive PATH TOO LONG, you would normally Use the 8.3 short name, unless it has been disabled. Type dir /x. If the 8.3 path is too long, start renaming parent folders until the path is short enough.
When you attempt to delete a folder and receive PATH TOO LONG, you would normally Use the 8.3 short name, unless it has been disabled. Type dir /x
I have scripted DelFolder.bat to delete a folder, even if the path is too long.
The syntax for using DelFolder.bat is:
DelFolder FolderPath
Where FolderPath is the path to the folder you wish to delete.
NOTE: DelFolder.bat uses RoboCopy.exe, which must be located in a folder that is in your PATH.
DelFolder.bat contains:
@echo off if {%1}=={}
@echo Syntax: DelFolder FolderPath&goto :EOF
if not exist %1 @echo Syntax: DelFolder FolderPath - %1 NOT found.&goto :EOF
setlocal
set folder=%1
set MT="%TEMP%\DelFolder_%RANDOM%"
MD %MT%
RoboCopy %MT% %folder% /MIR
RD /S /Q %MT%
RD /S /Q %folder%
endlocal
Set Home Folder Permissions
----------------------------------------------------------------------
@echo off
setlocal
:ok
set pf=%1
set dom=%2
for /F "Tokens=1" %%a in ('dir "E:\Users" /AD /B') do call :parse %%a
endlocal
GOTO :EOF
:parse
echo %*
ICACLS "E:\Users\%*" /reset /T
ICACLS "E:\Users\%*" /grant:r "domain.local\%*":(OI)(CI)F
ICACLS "E:\Users\%*" /setowner "domain.local\%*" /T
:end
----------------------------------------------------------------------------------------------
@echo off
setlocal
:ok
set pf=%1
set dom=%2
for /F "Tokens=1" %%a in ('dir "E:\Users" /AD /B') do call :parse %%a
endlocal
GOTO :EOF
:parse
echo %*
ICACLS "E:\Users\%*" /reset /T
ICACLS "E:\Users\%*" /grant:r "domain.local\%*":(OI)(CI)F
ICACLS "E:\Users\%*" /setowner "domain.local\%*" /T
:end
----------------------------------------------------------------------------------------------
Monday, August 1, 2011
IOS VPN Template
crypto isakmp policy 1
encr 3des
hash sha
authentication pre-share
group 2
crypto isakmp key xxxxxxxx address 200.200.100.1
no crypto isakmp ccm
crypto ipsec transform-set VPN-TRANSFORM esp-3des esp-sha-hmac
crypto map VPN-LINKS 10 ipsec-isakmp
set peer 200.200.100.1
set transform-set VPN-TRANSFORM
match address 110
int dialer 0
crypto map VPN-LINKS
access-list 110 permit ip 10.0.0.0 0.0.0.255 10.10.0.0 0.0.0.255
encr 3des
hash sha
authentication pre-share
group 2
crypto isakmp key xxxxxxxx address 200.200.100.1
no crypto isakmp ccm
crypto ipsec transform-set VPN-TRANSFORM esp-3des esp-sha-hmac
crypto map VPN-LINKS 10 ipsec-isakmp
set peer 200.200.100.1
set transform-set VPN-TRANSFORM
match address 110
int dialer 0
crypto map VPN-LINKS
access-list 110 permit ip 10.0.0.0 0.0.0.255 10.10.0.0 0.0.0.255
Subscribe to:
Posts (Atom)