Computer Hope

Microsoft => Microsoft DOS => Topic started by: Deadly D on September 22, 2009, 11:56:43 PM

Title: xcopy
Post by: Deadly D on September 22, 2009, 11:56:43 PM


   hi i want copy system hidden file so i do........ i try xcopy /h but this is not dun...

   so how i do.
Title: Re: xcopy
Post by: Dusty on September 23, 2009, 01:55:21 AM
Please post your code.
Title: Re: xcopy
Post by: Deadly D on September 23, 2009, 02:23:34 AM


Code: [Select]
C:\xcopy E:\my picture\we.jpg /h
Title: Re: xcopy
Post by: gpl on September 23, 2009, 08:31:09 AM
One thing strikes me, your file has a space in it, try it with quotes

Code: [Select]
xcopy "E:\my picture\we.jpg" /h
Title: Re: xcopy
Post by: Deadly D on September 23, 2009, 10:04:11 PM
(http://12.jpg)

But it ask for that Directory of file i want copy only file i give a "f" to all time.

  for any solution of that.
 
 i doing like this
Code: [Select]
@echo off
set textfile=C:\MyFolder\My test file.txt
set destfolder=C:\destination folder
for /f "delims=" %%F in ( ' type "%textfile%" ' ) do (
     echo Copying %%F
     xcopy "%%F" "%destfolder%" /h
)

at that time it happen

[attachment deleted by admin]
Title: Re: xcopy
Post by: Dusty on September 25, 2009, 01:53:14 AM
The XCopy message is issued because XCopy does not recognize the destination folder as a folder or a file.   Include a backslash "\" in your set command e.g.

Quote
set destfolder=C:\destination folder\