ordnance1
New member
I have created a batch file that works perfectly on 2 other computers, but on the 3rd computer the line:
Is not creating the copy of the file and placing it in C:\FECopy_GrandReceiver.
If I type C:\Users\%USERNAME%\OneDrive\Eagles_GrandReceiver_Distribution\MasterFile in file explorer, it takes me to the correct folder where Eagles_GrandReceiver_Master.accdb exists.
Should mention the 2 computers that work are windows 11 machine and the one not working is a windows 10 machine. Can't imagine that makes a difference but thought I should mention it.
Code:
COPY C:\Users\%USERNAME%\OneDrive\Eagles_GrandReceiver_Distribution\MasterFile\Eagles_GrandReceiver_Master.accdb
If I type C:\Users\%USERNAME%\OneDrive\Eagles_GrandReceiver_Distribution\MasterFile in file explorer, it takes me to the correct folder where Eagles_GrandReceiver_Master.accdb exists.
Should mention the 2 computers that work are windows 11 machine and the one not working is a windows 10 machine. Can't imagine that makes a difference but thought I should mention it.
Code:
@echo on
set DRIVE=none
if exist "D:\OneDrive\Eagles_GrandReceiver" set DRIVE=D
if %drive% ==D GOTO D_Drive
if exist "C:\Users\%USERNAME%\OneDrive\Eagles_GrandReceiver_Distribution" set DRIVE=C
if %drive% ==C GOTO C_Drive
:C_Drive
mkdir C:\FECopy_GrandReceiver
COPY C:\Users\%USERNAME%\OneDrive\Eagles_GrandReceiver_Distribution\MasterFile\Eagles_GrandReceiver_Master.accdb "C:\FECopy_GrandReceiver\Eagles_GrandReceiver_Copy.accdb"
rem C:\Users\Mike Simonds\OneDrive\Eagles_GrandReceiver_Distribution\MasterFile\Eagles_GrandReceiver_Master.accdb
Start /wait C:\FECopy_GrandReceiver\Eagles_GrandReceiver_Copy.accdb"
@RD /S /Q "C:\FECopy_GrandReceiver"
EXIT /b
:D_Drive
mkdir C:\FECopy_GrandReceiver
COPY D:\OneDrive\Eagles_GrandReceiver\Distribution\MasterFile\Eagles_GrandReceiver_Master.accdb "C:\FECopy_GrandReceiver\Eagles_GrandReceiver_Copy.accdb"
Start /wait C:\FECopy_GrandReceiver\Eagles_GrandReceiver_Copy.accdb"
rem DEL C:\FECopy_GrandReceiver\Eagles_GrandReceiver_Copy.accdb"
@RD /S /Q "C:\FECopy_GrandReceiver"
EXIT /b
:END
My Computer
System One
-
- OS
- Windows 11