Bat File Copy Problem

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
naman2207
Posts: 1
Joined: 24 Mar 2021 07:12

Bat File Copy Problem

#1 Post by naman2207 » 24 Mar 2021 07:14

Hi,
I am facing one issue.
When ran from an existing batch file the process executes successfully.
But when we copy the original data from that file to a new bat file it doesnt work..
Whats the solution for this?

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

Re: Bat File Copy Problem

#2 Post by aGerman » 24 Mar 2021 11:11

Guessing:
The new script file is saved with the wrong encoding or wrong file extension. Use the notepad editor that ships with Windows, select the "File"->"Save as" menu item, make sure the encoding is set to "ANSI" and the file type is "all files (*.*)". Explicitly write the filename with extension .bat in the file name box.

Steffen

Post Reply