Jump to content











Photo

Copy via command promt


  • Please log in to reply
4 replies to this topic

#1 Ankur.k1991

Ankur.k1991

    Member

  • Members
  • 54 posts
  •  
    India

Posted 06 March 2014 - 04:47 PM

I want to copy directory via command promt (example %HOMEPATH%\Desktop)

 

and

 

after copy it

 

paste by right click by cursor.

 

copy director with all data ??????

 



#2 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12688 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 06 March 2014 - 05:09 PM

When you mean the Windows command prompt, it's easy:

 

xcopy "<sourceDirectory>" "<targetParentDirectory>\<targetDirectoryName>" /e /y /i

(Quotes only necessary when spaces in the path)

 

Example:

xcopy "C:\Dokumente und Einstellungen\Peter\Desktop\WIMs\wim-boot" V:\WB2_A\WB2\winbuilder\run\output\wim-boot /e /y /i

 

I do not understand what you mean with "paste by right click by cursor"

 

Peter



#3 Ankur.k1991

Ankur.k1991

    Member

  • Members
  • 54 posts
  •  
    India

Posted 06 March 2014 - 05:34 PM

When you mean the Windows command prompt, it's easy:

 

xcopy "<sourceDirectory>" "<targetParentDirectory>\<targetDirectoryName>" /e /y /i

(Quotes only necessary when spaces in the path)

 

Example:

xcopy "C:\Dokumente und Einstellungen\Peter\Desktop\WIMs\wim-boot" V:\WB2_A\WB2\winbuilder\run\output\wim-boot /e /y /i

 

I do not understand what you mean with "paste by right click by cursor"

 

 

i mean

 

paste via context menu

like this

 

Untitled_zps2a0e7d9a.jpg



#4 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12688 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 06 March 2014 - 07:24 PM

Imo in Windows command line a context menu is not provided.

And there is also no way to bring the source directory into the clipboard for copy.

Peter

#5 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13749 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 06 March 2014 - 09:49 PM

http://blogs.msdn.co...3/08/86378.aspx



This is a tiny C# application I wrote a while back that allows you to copy/paste files via the clipboard. The main scenario I use it in is when I have multiple command prompt windows open and I want to copy files from one to the other without having to type in paths, etc.





ezClip - version 1.20
Written by Gus Perez - gus@gusperez.com - http://blog.gusperez.com
Provides clipboard copy/paste functionality from the command-line

usage: ezClip [copy|paste|add|list|output] <arguments>

For example:

'ezClip copy somefile.txt myapp.exe'
will copy somefile.txt and myapp.exe to the clipboard.

'ezClip paste'
will paste any files that are in the clipboard into the current directory.

'ezClip list'
will list the files that are currently on the clipboard

'ezClip add somefile.cmd *.obj'
will add somefile.cmd and all .obj files to the files already on the clipboard

'ezClip output dir /b'
will execute the command (3rd argument) using the provided parameters (4th argument+)
and captures its output and then copies it to the clipboard. The example above will
generate a list of files in the current directory and copies that list to the clipboard.

'<command> | ezClip'
will copy the piped in data stream to the clipboard. For example, 'dir | ezclip' will
copy the output of the 'dir' command to the clipboard.

Short forms also allowed for copy/paste/add/list/output by just using the corresponding
first letter. For example, 'ezclip c *.txt' will copy all text files to the clipboard.

For more information, bug reports, comments, or suggestions, please email gus@gusperez.com.

Thanks go out to Joel McIntyre for contributing a few great enhancements as well.
http://www.gusperez.com/downloads/bin/ezclip.zip
It must be tough :( living with a broken google. :dubbio:

BUT the above works fine for files, not for directories :frusty:.

:duff: 
Wonko

P.S.: This:
http://siddharthbarm...re/CmdCopyPaste
should do :unsure:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users