You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: win/massStorageCopy.bat
+1-9
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,5 @@
1
1
@echooff
2
2
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
-
11
3
setSOURCE=%2
12
4
setSRC_PARSE=%SOURCE:/=\%
13
5
setTARGET=%4
@@ -43,7 +35,7 @@ setlocal enabledelayedexpansion
43
35
for /F "skip=1 tokens=*"%%ain ('WMIC LOGICALDISK where"volumename like '%~1'" get deviceid 2^>NUL') doifnotdefined id setid=%%a
44
36
callset"deviceid=%%id: =%%"
45
37
ifnot"%deviceid%"=="" (
46
-
XCOPY%SRC_PARSE%%deviceid% /Y /Q
38
+
%~dp0busybox.exe cp -f %SRC_PARSE%%deviceid%
47
39
if!errorlevel!==0 (echo Upload complete on %1^(%deviceid%^))
0 commit comments