Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: XCOPY - How to avoid the "FILE or Directory" messa  (Read 4833 times)

0 Members and 1 Guest are viewing this topic.

DosDummy

  • Guest
XCOPY - How to avoid the "FILE or Directory" messa
« on: July 29, 2006, 05:43:24 PM »
I've been using XCOPY forever and never figured out how to avoid the nasty message:
Does C:\NewPlace\Data.txt specify a file name or a directory name on the target (F = File, D = Directory)

Is there a way of saying up front that it is a file - so if someone other than me is running the batch file they don't get prompted with what they consider a meaningless question.  I looked at all the XCOPY options and didn't see anything that would help.

I am running XCOPY from the following .BAT file.

Thanx in advance!
Angelo

Code: [Select]
@echo off

for /F "tokens=1,2*" %%i in (H:\AppDevCtr\DistAppl\DataFile.txt) do xcopy %%i %%j /y /q /k

echo You are done!  ------------ but we have to get rid of that nagging file or directory message

pause
exit:
« Last Edit: July 29, 2006, 05:44:34 PM by DosDummy »

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: XCOPY - How to avoid the "FILE or Directory" m
« Reply #1 on: July 29, 2006, 06:18:10 PM »
This was answered in your other post. Please don't double post as it confuses the natives. ;D
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein