liximomo / vscode-sftp

Super fast sftp/ftp extension for VS Code
MIT License
1.5k stars 264 forks source link

Creating Folder and files on remote server #693

Open opcodespace opened 4 years ago

opcodespace commented 4 years ago

Is this a similar or duplicate feature request?

Is your feature request related to a problem? Please describe. Most of cases I work on remote server directly. So it needs to create folder or file. Otherwise I am to open winscp/filezila and then create folder. So it goes back and forth work.

Describe the solution you'd like If there was action on right click on folder, it will create folder or file would be best.

Describe alternatives you've considered I use phpstorm for larger project. Sublime and winscp for short project. I wish to use visual code and your sftp plugin to get rid from sublime and winscp.

Does this project help you?

kevinmu17 commented 4 years ago

This is my most "wish SFTP had this" feature... Any plans on implementing this?

remcoov commented 4 years ago

Yeah, this feels like a really basic function to me? Would be great, really love SFTP!

jorgolo commented 4 years ago

and also would be great that you can rename files/folders on remote Server

cdsaenz commented 4 years ago

I'd definitely need that to move my workflow from Atom to VSCode. Your extension works perfect so far to save existing files but I use Atom's Remote FTP that works directly on the remote (create dirs/files, renames etc).

vincent1890 commented 3 years ago

I need it to move my workflow from Komodo IDE to VSCode. Good extension but too basic for the moment, still lacks a lot of functionality including the one mentioned above. Too bad it would be great and attract even more people

ghost commented 3 years ago

You can achieve the same result by opening the remote directory where you want to create files or directories with the plugin, creating the files or directories in the VSCode workspace and then syncing to the SFTP server. It achieves the same exact thing, just without the right-click in the context of the plugin menus.

kevinmu17 commented 3 years ago

You can achieve the same result by opening the remote directory where you want to create files or directories with the plugin, creating the files or directories in the VSCode workspace and then syncing to the SFTP server. It achieves the same exact thing, just without the right-click in the context of the plugin menus.

Yeah, this works but it is so counter productive. I don't want to leave VScode to create files in my finder.

ghost commented 3 years ago

You can do all of this right from VSCode by using its file explorer. There is no need to leave the application.

remcoov commented 3 years ago

Yes, you can use the file explorer. Or, for example if you are on a mac, you can use the VSCode terminal to create folders:

mkdir foldername

or files

touch index.html

But, I have to agree with @kevinmu17 on this, it's counter productive. Creating folders via FTP directly is obviously much quicker, because at this point you still have to upload everything by hand.

ghost commented 3 years ago

I might be missing something, but I believe it's slightly less efficient to create folders and files directly with FTP from VSCode than it is to do it on your local filesystem--at least with this plugin.

The way I'm thinking this would work is that you would have an plugin action for creating/renaming/deleting files via FTP/SFTP. When choosing that action from VSCode, that would give you another dropdown where you would perform your desired action. Then, the upload would take place after pressing the return key. So, that's 2 + n steps where n is the number of file manipulations being performed.

There are multiple ways you can achieve the same today. You could be logged into the remote server itself and perform file manipulations there, and then "Sync Remote --> Local" in VSCode, which is 1 + n number of steps where n is the number of actions you performed on the remote server. The beauty behind this is that you have complete autonomy over what is on the remote server and can perform bulk actions without having to worry about the connection dropping in between.

Or, you can do it the other way like I suggested in my previous post, where you create the files and folders in VSCode or on the local filesystem. In this scenario, you would "Sync Local --> Remote". Again, this is 1 + n steps.

The way I'm imagining the feature being requested would require an additional step than how the plugin achieves the same task right now. If you have a better solution, then I'm here to listen, but that's how most plugins FTP/SFTP plugins in VSCode behave from what I've seen.

kevinmu17 commented 3 years ago

I might be missing something, but I believe it's slightly less efficient to create folders and files directly with FTP from VSCode than it is to do it on your local filesystem--at least with this plugin.

None of the FTP extensions for VScode have this functionality, the weird thing is SFTP has only the option to DELETE. Trying to clear things up, we are talking about right clicking on the remote file tree. There are only 2 options in SFTP:

  1. Reveal in explorer
  2. Delete

Where we wish a lot more options to be implemented (other IDE's have these too)

  1. Rename folders/files
  2. Add folders/files

When working local this is not a problem, but when you have your site deployed and want some files to be created only first (for whatever reason) you first need to sync remote -> local so the folder is being created in your finder. Than you need to create a file (this can't be done in the finder, so you need to go back to VSCODE to create a new file and 'save as', search the remote folder and than hit save (syncs local -> remote)

This isn't 1 step, it's terrible workflow haha :)

So, we want this to be working in SFTP (like i said, other IDE's have this so it is possible):

Screenshot 2021-02-12 at 09 45 32

I know there are a lot of devs who wishing for this and not leaving their current IDE for this feature. I struggled for weeks to even find a decent FTP extension (coming from ATOM with remote-ftp)

zigojacko commented 3 years ago

While we're on that subject though, it would be very useful to have a delete option to delete from remote server as well as locally.

It's a right hassle if you have to delete files/folders to then connect to the server to delete the from there separately.

ghost commented 3 years ago

Ok I see now. That makes more sense. I guess I'm just used to shitty workflows :). I'll add this to the backlog.

Louiseh86 commented 1 year ago

I am in the process of moving away from Atom now that it has been 'sunset' and abandoned.

I decided to change over to VS Code (as recommended by friends) and quickly realized its impossible to create or rename files in SFTP - NOOOOOOO

So I will need to use FileZilla of cPanel File Manager to do this instead ☹️