Copy and Echo

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
falcios
Posts: 43
Joined: 02 Mar 2017 05:38

Copy and Echo

#1 Post by falcios » 06 Jul 2021 09:02

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.

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Copy and Echo

#2 Post by aGerman » 06 Jul 2021 10:54

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

falcios
Posts: 43
Joined: 02 Mar 2017 05:38

Re: Copy and Echo

#3 Post by falcios » 06 Jul 2021 12:17

Steffen, the code worked perfectly. Thanks so much.

Post Reply