I have a simple BAT file I run to copy files from one folder to 8 different folders. Then again to 8 different folders on a remote file server.
It looks like all the files are copied but it I have a pause at the end so I can see what files were copied. Before the files are copied to the remote file server there are a number of blank lines and I guess that is because it's taking some time to access the remote file server but they are in the middle of the last local file copy and at times the end of one copy command will be added to the middle of the pervious command.
This section in the BAT file.
Copy "C:\Users\LocalUser\Desktop\JHU InTouch Backups To Move\CONTROL ROOM PROGRAM*.aaPKG" "C:\NewLocal\New Updated InTouch Applications 2022-2023\InTouch 2014 R2 SP1 - 11.1.13100\Control Room"
Copy "C:\Users\LocalUser\Desktop\JHU InTouch Backups To Move\POLE PC*.aaPKG" "C:\NewLocal\New Updated InTouch Applications 2022-2023\InTouch 2014 R2 SP1 - 11.1.13100\Pole PC"
Copy "C:\Users\LocalUser\Desktop\JHU InTouch Backups To Move\4D4*.aaPKG" "C:\NewLocal\New Updated InTouch Applications 2022-2023\InTouch 2020 R2 SP1 - 20.1.100\4D4"
Copy "C:\Users\LocalUser\Desktop\JHU InTouch Backups To Move\PTCU2*.aaPKG" "C:\NewLocal\New Updated InTouch Applications 2022-2023\InTouch 2020 R2 SP1 - 20.1.100\PTCU2"
Copy "C:\Users\LocalUser\Desktop\JHU InTouch Backups To Move\WEST*.aaPKG" "C:\NewLocal\New Updated InTouch Applications 2022-2023\InTouch 2020 R2 SP1 - 20.1.100\WEST"
Looks like this in the running CMD window.
C:\Users\LocalUser\Desktop\JHU InTouch Backups To Move>Copy "C:\Users\LocalUser\Desktop\JHU InTouch Backups To Move\CONTROL ROOM PROGRAM*.aaPKG" "C:\NewLocal\New Updated InTouch Applications 2022-2023\InTouch 2014 R2 SP1 - 11.1.13100\Control Room"
C:\Users\LocalUser\Desktop\JHU InTouch Backups To Move\CONTROL ROOM PROGRAM_04-26-2023.aaPKG
1 file(s) copied.
C:\Users\LocalUser\Desktop\JHU InTouch Backups To Move>Copy "C:\Users\LocalUser\Desktop\JHU InTouch Backups To Move\POLE PC*.aaPKG" "C:\NewLocal\New Updated InTouch Applications 2022-2023\InTouch 2014 R2 SP1 - 11.1.13100\Pole PC"
C:\Users\LocalUser\Desktop\JHU InTouch Backups To Move\POLE PC_04-26-2023.aaPKG
1 file(s) copied.
C:\Users\LocalUser\Desktop\JHU InTouch Backups To Move\WEST*.aaPKG
The system cannot find the file specified.
0 file(s) copied.
Other times I've seen it put the output of one copy command in the middle of the one before.
So this.
C:\Users\LocalUser\Desktop\JHU InTouch Backups To Move>Copy "C:\Users\LocalUser\Desktop\JHU InTouch Backups To Move\POLE PC*.aaPKG" "C:\NewLocal\New Updated InTouch Applications 2022-2023\InTouch 2014 R2 SP1 - 11.1.13100\Pole PC"
C:\Users\LocalUser\Desktop\JHU InTouch Backups To Move\POLE PC_04-26-2023.aaPKG
1 file(s) copied.
Ends up something like this.
C:\Users\LocalUser\Desktop\JHU InTouch Backups To Move>Copy "C:\Users\LocalUser\Desktop\JHU InTouch Backups To Move\POLE PC*.aaPKG" "C:\NewLocal\New Updated InToC:\Users\LocalUser\Desktop\JHU InTouch Backups To Move\WEST*.aaPKG
I tried putting a pause after each copy command and stepping through it. Each copy command is then listed in full but I have to press the any key for each file copy. Again, it seems to work but make me wonder if something is wrong with the PC or the BAT file.