View unanswered posts | View active topics It is currently 20 Sep 2014 14:00



Post new topic Reply to topic  [ 10 posts ] 
how to copy several files to somewhere? 
Author Message

Joined: 08 Sep 2010 10:25
Posts: 84
Location: Iran,Kashan
Post how to copy several files to somewhere?
i want to copy two files for example c:\a.jpg and c:\a.txt to d:\

how to do it by 1 line command?
(not using "for" command)


10 May 2012 04:21
Profile YIM

Joined: 08 Apr 2012 17:11
Posts: 187
Post Re: how to copy several files to somewhere?
Mohammad_Dos wrote:
i want to copy two files for example c:\a.jpg and c:\a.txt to d:\

how to do it by 1 line command?
(not using "for" command)


In this example, this should work.
Code:
copy /b C:\a.* D:\


10 May 2012 04:28
Profile WWW

Joined: 08 Sep 2010 10:25
Posts: 84
Location: Iran,Kashan
Post Re: how to copy several files to somewhere?
i just want to copy these certain files. not any more. some other files with the same name "a" my be exist


10 May 2012 04:40
Profile YIM
Online

Joined: 10 Feb 2012 02:20
Posts: 4189
Post Re: how to copy several files to somewhere?
Mohammad_Dos wrote:
i want to copy two files for example c:\a.jpg and c:\a.txt to d:\

how to do it by 1 line command?
(not using "for" command)



My question is why do you want that?


10 May 2012 05:40
Profile

Joined: 23 Dec 2011 13:59
Posts: 1837
Post Re: how to copy several files to somewhere?
Only way I can see to do it is with a FOR command.
for /F "tokens=*" %G in ('dir /a-d /b C:\a.txt C:\a.jpg') do copy %G D:\


10 May 2012 05:45
Profile
Online

Joined: 10 Feb 2012 02:20
Posts: 4189
Post Re: how to copy several files to somewhere?
He doesn't want to use the for command, Squashman.

The solution is very simple - and it seems to me like it is a question from an academic course.


10 May 2012 05:47
Profile

Joined: 23 Dec 2011 13:59
Posts: 1837
Post Re: how to copy several files to somewhere?
I suppose you could do this as well.
copy a.txt T:\ & copy a.jpg T:\


10 May 2012 05:48
Profile
Online

Joined: 10 Feb 2012 02:20
Posts: 4189
Post Re: how to copy several files to somewhere?
Yeah. Maybe you should let him think for himself for such an elementary answer.


10 May 2012 05:56
Profile

Joined: 08 Apr 2012 17:11
Posts: 187
Post Re: how to copy several files to somewhere?
foxidrive wrote:
and it seems to me like it is a question from an academic course.

I thought that as well.


10 May 2012 08:02
Profile WWW

Joined: 08 Sep 2010 10:25
Posts: 84
Location: Iran,Kashan
Post Re: how to copy several files to somewhere?
thanks to all :wink:


11 May 2012 04:54
Profile YIM
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 


Who is online

Users browsing this forum: Bing [Bot], foxidrive, Google [Bot], npocmaka_, Yahoo [Bot] and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Forum style by Vjacheslav Trushkin for Free Forums/DivisionCore.