If not exist command

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

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

If not exist command

#1 Post by falcios » 23 May 2021 23:43

I have the following script

I want to go to :MENU if k:\dtsc does not exist
This script does not go to the menu.
Can you tell me how to update this line?

robocopy "c:\test" "k:\dtsc" /MIR /xf desktop.ini /e /np /tee /ndl
if not exist k:\dtsc GOTO :MENU

Thanks in advance.

Squashman
Expert
Posts: 4292
Joined: 23 Dec 2011 13:59

Re: If not exist command

#2 Post by Squashman » 24 May 2021 08:42

You have not shown us enough code to make any definitive solution to your problem.

Not understanding why you are checking it after the robocopy command.

Post Reply