You should get some output when it completes. For example this is what I get for the Analysis,
C:\WINDOWS\system32>defrag c: -a -v
Microsoft Drive Optimizer
Copyright (c) 2013 Microsoft Corp.
Invoking analysis on Windows 8 (C:)...
The operation completed successfully.
Post Defragmentation Report:
Volume Information:
Volume size = 119.99 GB
Cluster size = 4 KB
Used space = 43.23 GB
Free space = 76.75 GB
Fragmentation:
Total fragmented space = 0%
Average fragments per file = 1.01
Movable files and folders = 122091
Unmovable files and folders = 9
Files:
Fragmented files = 711
Total file fragments = 1816
Folders:
Total folders = 7637
Fragmented folders = 25
Total folder fragments = 54
Free space:
Free space count = 9364
Average free space size = 8.39 MB
Largest free space size = 59.09 GB
Master File Table (MFT):
MFT size = 321.75 MB
MFT record count = 329471
MFT usage = 100%
Total MFT fragments = 2
Note: File fragments larger than 64MB are not included in
ion statistics.
You do not need to defragment this volume.
C:\WINDOWS\system32>
A DOS Windows should always return to the Prompt (C:\WINDOWS\system32>) when it is ready for the next command after completing the initial command you entered. You can not run multiple commands and have to wait for a command to finish executing before entering new commands. So when it comes back to the Prompt (C:\WINDOWS\system32>) you know that job has finished.