Page 1 of 1

Copy and Echo

Posted: 06 Jul 2021 09:02
by falcios
I copied:
copy c:\users\test\sample.txt" "d:\test"

I get 1 file(s) copied.

I want to see the full path of what it is being copied.

I used echo copy c:\users\test\sample.txt" "d:\test" but when I ran the batch file it showed the full path but did not copy

What command can I use to view the full path when copying?

Thanks in advance.

Re: Copy and Echo

Posted: 06 Jul 2021 10:54
by aGerman
You can't change the behavior of the copy command. However, with ECHO turned ON you'll see the executed command. And if you don't want to get a visible prompt, update it to the invisible backspace-space-backspace combination using the $H code.

Before copying:

Code: Select all

prompt $h
echo on
After copying:

Code: Select all

@echo off
Steffen

Re: Copy and Echo

Posted: 06 Jul 2021 12:17
by falcios
Steffen, the code worked perfectly. Thanks so much.