Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode :: How can I duplicate directories and files from within the file explorer?

Ideally, I would right-click on the folder/directory or file I want to duplicate, choose "Duplicate" and, hopefully, would be asked in the same step to give the new duplicated file or directory a new name.

Looking at the current options, I couldn't find a way to do this on latest VSCode 1.19.1 (macOS):

enter image description here

enter image description here

Am I missing something? Is there other way to do this?

The more I use VSCode, the more I get used to it and, lately, I found myself barely needing to use the terminal provided in the Panel, or switching to a terminal app, for simple stuff like this.

like image 997
solr Avatar asked Jan 02 '18 14:01

solr


People also ask

How do I copy multiple files in VS Code?

In addition to ctrl + shift + v you can use ctrl + shift + c to Merge-Copy. And ctrl + shift + x to Merge-Cut. Select clipboard to paste ( ctrl + alt + v ). Paste and cycle through clipboard items ( ctrl + shift + v ).

How do I select multiple folders in VS Code?

Drag and drop# Drag a folder to the File Explorer to add it to the current workspace. You can even select and drag multiple folders. Note: Dropping a single folder into the editor region of VS Code will still open the folder in single folder mode.


1 Answers

To duplicate a file within a folder:

  • right click on the file,
  • press copy
  • now right click on the folder, and
  • press paste
  • the file will be duplicated into the same folder with "...-1" or " copy" appended to the file name
like image 138
ttfreeman Avatar answered Oct 22 '22 07:10

ttfreeman