Skip to content

Commit 7bdbd40

Browse files
committed
chore: replace xcpy usage by busybox cp
Signed-off-by: Frederic Pillon <[email protected]>
1 parent fdae1cc commit 7bdbd40

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

win/massStorageCopy.bat

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
@echo off
22

3-
rem Exit codes for xcopy
4-
rem code | Description
5-
rem 0 | Files were copied without error.
6-
rem 1 | No files were found to copy.
7-
rem 2 | The user pressed CTRL+C to terminate xcopy.
8-
rem 4 | Initialization error occurred. There is not enough memory or disk space, or you entered an invalid drive name or invalid syntax on the command line.
9-
rem 5 | Disk write error occurred.
10-
113
set SOURCE=%2
124
set SRC_PARSE=%SOURCE:/=\%
135
set TARGET=%4
@@ -43,7 +35,7 @@ setlocal enabledelayedexpansion
4335
for /F "skip=1 tokens=*" %%a in ('WMIC LOGICALDISK where "volumename like '%~1'" get deviceid 2^>NUL') do if not defined id set id=%%a
4436
call set "deviceid=%%id: =%%"
4537
if not "%deviceid%" == "" (
46-
XCOPY %SRC_PARSE% %deviceid% /Y /Q
38+
%~dp0busybox.exe cp -f %SRC_PARSE% %deviceid%
4739
if !errorlevel! == 0 (echo Upload complete on %1 ^(%deviceid%^))
4840
exit !errorlevel!)
4941
goto :eof

0 commit comments

Comments
 (0)