• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

Trying to check for the existance of a file using a logon batch file

Hello, this is the command I am trying to get to work:

FOR %%A IN ("\\WIN2008-V2K\deploy\v2k_Test\v2k*.txt") DO IF NOT EXIST "C:\Visual 2000\v2k_Test\%%~xnA" goto TEST
GOTO COMPONENT

It is checking the location for "v2k*.txt" instead of checking for any txt files in that directory. Can anyone help me write this correctly?

Thanks.
Jon
FOR %%A IN ("\\WIN2008-V2K\deploy\v2k_Test\v2k*.txt") DO IF NOT EXIST "C:\Visual 2000\v2k_Test\%%~xnA" goto TEST
GOTO COMPONENT

Open in new window

0
Jon DeVito
Asked:
Jon DeVito
1 Solution
 
Jon DeVitoAuthor Commented:
I figured it out on my own, please close this question.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now