Skip to content

Instantly share code, notes, and snippets.

@hagb4rd
Last active September 30, 2017 16:41
Show Gist options
  • Save hagb4rd/3b7723bf17a196befda1d3d21404a396 to your computer and use it in GitHub Desktop.
Save hagb4rd/3b7723bf17a196befda1d3d21404a396 to your computer and use it in GitHub Desktop.
CMD.exe ComSpec Windows .BAT & .COM script samples
REM A Set of requirejs related repositories
git clone https://github.com/hagb4rd/ea-webkit.git
git clone https://github.com/cssinjs/jss-global.git
git clone https://github.com/millermedeiros/requirejs-plugins.git
git clone https://github.com/jfparadis/requirejs-mustache.git
git clone https://github.com/millermedeiros/requirejs-plugins.git
git clone https://github.com/guybedford/require-css
git clone https://github.com/requirejs/text.git
git clone https://github.com/requirejs/i18n.git
git clone https://github.com/requirejs/domReady.git
git clone https://github.com/requirejs/requirejs.git
echo.
echo launch via localhost to run all test
echo localhost/requirejs/tests/doh/runner.html?testUrl=../all
echo.
echo start https://github.com/requirejs/requirejs
#A Set of requirejs related repositories
git clone https://github.com/hagb4rd/ea-webkit.git
git clone https://github.com/cssinjs/jss-global.git
git clone https://github.com/millermedeiros/requirejs-plugins.git
git clone https://github.com/jfparadis/requirejs-mustache.git
git clone https://github.com/millermedeiros/requirejs-plugins.git
git clone https://github.com/guybedford/require-css
git clone https://github.com/requirejs/text.git
git clone https://github.com/requirejs/i18n.git
git clone https://github.com/requirejs/domReady.git
git clone https://github.com/requirejs/requirejs.git
echo launch via localhost to run all test
echo localhost/requirejs/tests/doh/runner.html?testUrl=../all
echo Documentation
echo https://github.com/requirejs/requirejs
REM xc.bat <source> <target>
REM ----------
REM xcopy with default values set similar to explorer defaults
if [%1]==[] GOTO error
if [%2]==[] GOTO error
goto start
:error
xcopy /?
REM Annotations
REM ------
REM /e create all (empty) subdirs
REM /i asumes target is a new dir when copying several files into a single not existing target
REM /f verbose copying
REM /h copy hidden and system file too
REM /r overwrites exiating files
REM /k copies attributes (removing write protection by default)
REM /o copy ACL ownership attributes
REM /b copy symbolic link instead of its target
REM OFF BUT USEFULs
REM --------------
REM /a copy files set as archive, resetting archive state
REM /z copy after restart
REM /n use 8.3 short names
REM /c continues on errors
REM /L list files
REM /q quiet mode (see /f)
REM /t copy only folder structure
REM /u copy overwriting only exiting target files
REM /G copy encrypted data even when losing encryption
REM /D:M-T-J copy only files newer than passed date M-T-J. Is no date specified copies and overwrites only new, and files with a newer timestamp than target
REM USAGE
REM -----
REM xc.bat <source> <target> [<opts>]
goto eof
:start
setlocal
set SRC="%~f1"
set TARGET="%~f2"
takeown /F %SRC%
takeown /F %TARGET%
xcopy /e /i /h /r /k /o /b /g /l %SRC% %TARGET% %3 %4
REM runas /savecred /noprofile /u:hagb4rd /elevate
:eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment