Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. robocopy from_folder to_folder files_to_copy /MOV
  2.  
  3. robocopy from_folder to_folder files_to_copy /MOVE
  4.  
  5. Exit
  6. code Description
  7. ==== ===========
  8. 0 Files were copied without error.
  9. 1 No files were found to copy.
  10. 2 The user pressed CTRL+C to terminate xcopy.
  11. 4 Initialization error occurred. There is not
  12. enough memory or disk space, or you entered
  13. an invalid drive name or invalid syntax on
  14. the command line.
  15. 5 Disk write error occurred.
  16.  
  17. Rem Attempt file copy...
  18. xcopy /D /V %1 %2
  19.  
  20. Rem Check result code and if it was successful (0), delete the source.
  21. if errorlevel 0 (
  22. echo Copy completed successfully
  23. del /Q %1
  24. exit /B
  25. )
  26.  
  27. Rem Not Errorlevel 0...
  28. echo Copy failed for some reason.
  29.  
  30. move C:source_dir*.* D:target_dir
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement