SlideShare a Scribd company logo
1 of 2
@echooff
echo[%date% - %time%] Logstart>> C:AGS_BATCHBatch.log
if not exist"G:SAGEM_WQAR"gotoERROR1
if not exist"W:DOWNLOAD"gotoERROR2
dir /b"G:SAGEM_WQAR*" | >nul findstr"^" && (echo[%date% - %time%] Datainthe folderexist,readyforcopying>>
C:AGS_BATCHBatch.log) ||(GOTOERROR3)
REM XCOPYpart
xcopy/S/E/R/Y/I/CG:SAGEM_WQARW:DOWNLOAD
IF %ERRORLEVEL%NEQ 0 GOTO ERROR_HANDLER
REM DELETE All part
del /s/f/qG:SAGEM_WQAR*
for /D %%i in("G:SAGEM_WQAR*") doRD /S/Q "%%i"
echo[%date% - %time%] Copyingsucessful.>>C:AGS_BATCHBatch.log
GOTO QUIT
:ERROR1
echo[%date% - %time%] ERROR1-Source datadoesnnotexistornotavailable.>>C:AGS_BATCHBatch.log
echo[%date% - %time%] Check"G:SAGEM_WQAR"folder.>>C:AGS_BATCHBatch.log
GOTO QUIT
:ERROR2
echo[%date% - %time%] ERROR2-Destinationfolderdoesnnotexistornotavailable.>>C:AGS_BATCHBatch.log
echo[%date% - %time%] Check"W:DOWNLOAD"folder.>>C:AGS_BATCHBatch.log
GOTO QUIT
:ERROR3
echo[%date% - %time%] Nodatafoundinthe Source folder,processaborted>>C:AGS_BATCHBatch.log
GOTO QUIT
:ERROR_HANDLER
echo[%date% - %time%] Erroroccuredduringcopyingof flightdata.>> C:AGS_BATCHBatch.log
echo[%date% - %time%] Please checkyouroriginanddestinationfolders.>>C:AGS_BATCHBatch.log
echo[%date% - %time%] Batchfile returncode:%ERRORLEVEL%>>C:AGS_BATCHBatch.log
GOTO QUIT
:QUIT
echo.>> C:AGS_BATCHBatch.log
exit

More Related Content

What's hot

G*なクラウド ~雲のかなたに~
G*なクラウド ~雲のかなたに~G*なクラウド ~雲のかなたに~
G*なクラウド ~雲のかなたに~Tsuyoshi Yamamoto
 
bank management system
bank management systembank management system
bank management systemAisha Aisha
 
Gogo shell
Gogo shellGogo shell
Gogo shelljwausle
 
Sparknize - Visualize CSV Data With Sparkline In Seconds
Sparknize - Visualize CSV Data With Sparkline In SecondsSparknize - Visualize CSV Data With Sparkline In Seconds
Sparknize - Visualize CSV Data With Sparkline In SecondsKei Sawada
 
Thread介紹
Thread介紹Thread介紹
Thread介紹Jack Chen
 
(Meta 2.3) figura de auto con simbolos dev c++
(Meta 2.3) figura de auto con simbolos dev c++ (Meta 2.3) figura de auto con simbolos dev c++
(Meta 2.3) figura de auto con simbolos dev c++ Eli Diaz
 
我在 Mac 上的常用开发工具
我在 Mac 上的常用开发工具我在 Mac 上的常用开发工具
我在 Mac 上的常用开发工具dennis zhuang
 
An introduction to Git with Atlassian Suite
An introduction to Git with Atlassian SuiteAn introduction to Git with Atlassian Suite
An introduction to Git with Atlassian SuiteChetan Khatri
 
BeautifulSoup / selenium Deep dive
BeautifulSoup / selenium Deep diveBeautifulSoup / selenium Deep dive
BeautifulSoup / selenium Deep diveNaoto MATSUMOTO
 
Git branching model_for_tap_team
Git branching model_for_tap_teamGit branching model_for_tap_team
Git branching model_for_tap_teamGrzegorz Wilczynski
 

What's hot (18)

Bubble Sort
Bubble SortBubble Sort
Bubble Sort
 
G*なクラウド ~雲のかなたに~
G*なクラウド ~雲のかなたに~G*なクラウド ~雲のかなたに~
G*なクラウド ~雲のかなたに~
 
bank management system
bank management systembank management system
bank management system
 
Elixir flow
Elixir flowElixir flow
Elixir flow
 
Gogo shell
Gogo shellGogo shell
Gogo shell
 
Sparknize - Visualize CSV Data With Sparkline In Seconds
Sparknize - Visualize CSV Data With Sparkline In SecondsSparknize - Visualize CSV Data With Sparkline In Seconds
Sparknize - Visualize CSV Data With Sparkline In Seconds
 
Git avançado
Git avançadoGit avançado
Git avançado
 
181220_slideshare_git
181220_slideshare_git181220_slideshare_git
181220_slideshare_git
 
Functional php
Functional phpFunctional php
Functional php
 
Thread介紹
Thread介紹Thread介紹
Thread介紹
 
(Meta 2.3) figura de auto con simbolos dev c++
(Meta 2.3) figura de auto con simbolos dev c++ (Meta 2.3) figura de auto con simbolos dev c++
(Meta 2.3) figura de auto con simbolos dev c++
 
我在 Mac 上的常用开发工具
我在 Mac 上的常用开发工具我在 Mac 上的常用开发工具
我在 Mac 上的常用开发工具
 
Mpi cheat sheet
Mpi cheat sheetMpi cheat sheet
Mpi cheat sheet
 
An introduction to Git with Atlassian Suite
An introduction to Git with Atlassian SuiteAn introduction to Git with Atlassian Suite
An introduction to Git with Atlassian Suite
 
BeautifulSoup / selenium Deep dive
BeautifulSoup / selenium Deep diveBeautifulSoup / selenium Deep dive
BeautifulSoup / selenium Deep dive
 
Git branching model_for_tap_team
Git branching model_for_tap_teamGit branching model_for_tap_team
Git branching model_for_tap_team
 
8.1
8.18.1
8.1
 
C prog1
C prog1C prog1
C prog1
 

Similar to Data_moving_script

Noah Zoschke at Waza 2013: Heroku Secrets
Noah Zoschke at Waza 2013: Heroku SecretsNoah Zoschke at Waza 2013: Heroku Secrets
Noah Zoschke at Waza 2013: Heroku SecretsHeroku
 
Augeas
AugeasAugeas
Augeaslutter
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and PracticeBo-Yi Wu
 
Apache Airflow
Apache AirflowApache Airflow
Apache AirflowJason Kim
 
Plone Conference 2008 Lightning Talk Static Zope Rpx
Plone Conference 2008 Lightning Talk Static Zope RpxPlone Conference 2008 Lightning Talk Static Zope Rpx
Plone Conference 2008 Lightning Talk Static Zope RpxParis, France
 
JavaOne2010 Groovy/Spring Roo
JavaOne2010 Groovy/Spring RooJavaOne2010 Groovy/Spring Roo
JavaOne2010 Groovy/Spring RooYasuharu Nakano
 
Rush, a shell that will yield to you
Rush, a shell that will yield to youRush, a shell that will yield to you
Rush, a shell that will yield to youguestdd9d06
 
Gitosis on Mac OS X Server
Gitosis on Mac OS X ServerGitosis on Mac OS X Server
Gitosis on Mac OS X ServerYasuhiro Asaka
 
Prepare Document
Prepare  DocumentPrepare  Document
Prepare DocumentTony Smith
 

Similar to Data_moving_script (13)

God Presentation
God PresentationGod Presentation
God Presentation
 
Noah Zoschke at Waza 2013: Heroku Secrets
Noah Zoschke at Waza 2013: Heroku SecretsNoah Zoschke at Waza 2013: Heroku Secrets
Noah Zoschke at Waza 2013: Heroku Secrets
 
Augeas
AugeasAugeas
Augeas
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and Practice
 
Apache Airflow
Apache AirflowApache Airflow
Apache Airflow
 
Travel & Lifestyle
Travel & LifestyleTravel & Lifestyle
Travel & Lifestyle
 
Plone Conference 2008 Lightning Talk Static Zope Rpx
Plone Conference 2008 Lightning Talk Static Zope RpxPlone Conference 2008 Lightning Talk Static Zope Rpx
Plone Conference 2008 Lightning Talk Static Zope Rpx
 
JavaOne2010 Groovy/Spring Roo
JavaOne2010 Groovy/Spring RooJavaOne2010 Groovy/Spring Roo
JavaOne2010 Groovy/Spring Roo
 
Rush, a shell that will yield to you
Rush, a shell that will yield to youRush, a shell that will yield to you
Rush, a shell that will yield to you
 
Speeding up Red Team engagements with carnivorall
Speeding up Red Team engagements with carnivorallSpeeding up Red Team engagements with carnivorall
Speeding up Red Team engagements with carnivorall
 
Cuaderno
CuadernoCuaderno
Cuaderno
 
Gitosis on Mac OS X Server
Gitosis on Mac OS X ServerGitosis on Mac OS X Server
Gitosis on Mac OS X Server
 
Prepare Document
Prepare  DocumentPrepare  Document
Prepare Document
 

Data_moving_script

  • 1. @echooff echo[%date% - %time%] Logstart>> C:AGS_BATCHBatch.log if not exist"G:SAGEM_WQAR"gotoERROR1 if not exist"W:DOWNLOAD"gotoERROR2 dir /b"G:SAGEM_WQAR*" | >nul findstr"^" && (echo[%date% - %time%] Datainthe folderexist,readyforcopying>> C:AGS_BATCHBatch.log) ||(GOTOERROR3) REM XCOPYpart xcopy/S/E/R/Y/I/CG:SAGEM_WQARW:DOWNLOAD IF %ERRORLEVEL%NEQ 0 GOTO ERROR_HANDLER REM DELETE All part del /s/f/qG:SAGEM_WQAR* for /D %%i in("G:SAGEM_WQAR*") doRD /S/Q "%%i" echo[%date% - %time%] Copyingsucessful.>>C:AGS_BATCHBatch.log GOTO QUIT :ERROR1 echo[%date% - %time%] ERROR1-Source datadoesnnotexistornotavailable.>>C:AGS_BATCHBatch.log
  • 2. echo[%date% - %time%] Check"G:SAGEM_WQAR"folder.>>C:AGS_BATCHBatch.log GOTO QUIT :ERROR2 echo[%date% - %time%] ERROR2-Destinationfolderdoesnnotexistornotavailable.>>C:AGS_BATCHBatch.log echo[%date% - %time%] Check"W:DOWNLOAD"folder.>>C:AGS_BATCHBatch.log GOTO QUIT :ERROR3 echo[%date% - %time%] Nodatafoundinthe Source folder,processaborted>>C:AGS_BATCHBatch.log GOTO QUIT :ERROR_HANDLER echo[%date% - %time%] Erroroccuredduringcopyingof flightdata.>> C:AGS_BATCHBatch.log echo[%date% - %time%] Please checkyouroriginanddestinationfolders.>>C:AGS_BATCHBatch.log echo[%date% - %time%] Batchfile returncode:%ERRORLEVEL%>>C:AGS_BATCHBatch.log GOTO QUIT :QUIT echo.>> C:AGS_BATCHBatch.log exit