Should Ctrl-C interrupt a COPY?

May 20, 2008
11,400
99
Syracuse, NY, USA
Ctrl-C doesn't seem to interrupt a COPY. In my test, I copied a 500MB file from one drive to another (simply, "COPY 500meg y:\") ... about an 8-second job. I held Ctrl-C the whole time; it was not interrupted.

Originally (and ill-advisedly) I started a 500MB copy to a share on an internet VPN and found I couldn't stop it.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,461
88
Albuquerque, NM
prospero.unm.edu
In 4DOS it would; but then 4DOS was doing most of the work, read-write, read-write, read-write, until done. In TCC I think it's just a single API call, CopyFileEx() or whatever.
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
Ctrl-C doesn't seem to interrupt a COPY. In my test, I copied a 500MB file from one drive to another (simply, "COPY 500meg y:\") ... about an 8-second job. I held Ctrl-C the whole time; it was not interrupted.

That's Windows -- the copy is done inside a (non-interruptable) Windows API.

This is not actually 100% true -- there are some types of COPY (like /A) that copy in blocks, and others (like /G) that do a callback and can be interrupted.
 
Similar threads
Thread starter Title Forum Replies Date
vefatica Should it be this slow? Support 14
jfalch WAD internal "which" should check for FILEEXIST when using AppPaths entry Support 8
MickeyF alias terminating before it should Support 3
cgunhouse One of the Focuses of V17 Beta Testing Should Be Command Line Parsing Support 1
T TCTOOLBAR /C & TCTOOLBAR /I should reload toolbar from TCMD.INI, right? Support 1
mfarah Mouse wheel scrolling in TCC. What should we expect? Support 10
R Emacs-style cmdline editing Ctrl-K Support 0
vefatica Can I alias @@Ctrl-Shift-Alt-u? Support 4
cgunhouse Ctrl-C from within a library function Support 6
Alpengreis Fixed [v26.00.26] Crash after answering INKEY with <Ctrl>+C Support 1
vefatica Ctrl-F? Support 3
MickeyF expand alias in cmdline with Ctrl-F in TCC Support 21
MickeyF Ctrl-S and Ctrl-Q in TCC Support 6
Peter Murschall IDE: Ctrl-W is a Harakiri Command ! Support 23
A How to? Copy+Paste in TCMD tabs with Ctrl-Shift-Ins? Support 5
samintz TCEDIT Ctrl-S Support 2
vefatica Ctrl-Alt-L (R, Left, Right). Support 8
M Ctrl-C when using command line history does nothing Support 2
V Ctrl-Home/End don't work in Win10 Support 3
Charles Dye Ctrl-Shift-Up doesn't update directory history Support 1
vefatica TPIPE.EXE crashes on Ctrl-C Support 9
Peter Murschall IDE destroys Text on Ctrl-U/Ctrl-Shift-U Support 12
vefatica Ctrl-Enter in command history window? Support 8
vefatica TPIPE crashes on Ctrl-C Support 1
cgunhouse Ctrl + Shift keys and Paste (drop down menu and V) Support 4
M View doesn't recognize Ctrl+End and Ctrl+Pos1 Support 2
M Ctrl-End doesn't work. DelToEnd is not executed Support 13
C Output continues after Ctrl-Break Support 8
J How to? Debug Keyboard Shortcuts (Ctrl-A not remapping?) Support 8
Jay Sage Ctrl-C Not Working Reliably to Copy Screen Content Support 4
vefatica Ctrl-x? Support 13
C How to? ctrl-c does not prompt "Terminate batch job" Support 2
vefatica Ctrl-T and Ctrl-Shift-T Support 6
P Disable global hotkey Ctrl+Shift+T Support 19
vefatica DATEMONITOR + Ctrl-C crashes TCCv15 Support 5
dcantor Fixed Ctrl+Shift+Insert repeats last character Support 3
A WAD No newlines in copy with Ctrl-Ins Support 2
A Ctrl-1 and the command history Support 5
vefatica Ctrl-Up/Down? Support 21
E Ctrl-V does not always work in BDEBUGGER Support 4
M Ctrl-C and Java Support 19
K Ctrl-D alias no longer works Support 4
vefatica Ctrl-F1? Support 0
J CTRL-C does not work on Windows 7 64-bit Support 3
dcantor Does variable expansion (ctrl-x) actually work? Support 27
E Ctrl+C not working as expected Support 8
Juanma Barranquero Ctrl-C trouble Support 1
Fross CTRL-C in V10 Support 3
S Ctrl-C handling while piping Support 0
vefatica .PL and Ctrl-C Support 3

Similar threads