How to suppess xcopy "... specify file name or directory ... "

Posted on 2005-04-28
Last Modified: 2012-05-05
Getting the following prompt on "xcopy FILE*.txt INPUT.txt /Y"

"Does INPUT.txt specify a file name
or directory name on the target
(F = file, D = directory)?"

need to suppress or take F automatically
Question by:dlapid
    LVL 25

    Accepted Solution

    you should be able to specify F automatically, using this command instead:

      echo F | xcopy FILE*.txt INPUT.txt /Y

    LVL 25

    Expert Comment

    I'm curious however, to where these files are being copied to? .. and this is the confusion that the XCOPY app is having...
    LVL 25

    Expert Comment

    ..You see, you must specify the target directory, of where to copy the files to, here's an example of syntax:

       xcopy "fileToCopy.ext" "c:\directoryToCopyTo" /Y

    However, you've specified two files (or, at least, the INPUT.txt takes the form of a file).
    LVL 25

    Expert Comment


    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Suggested Solutions

    A short article about a problem I had getting the GPS LocationListener working.
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now