You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
I am trying to copy a folder to my server using this command:
{:ok,conn}=SSHEx.connect([ip: "my-ip",user: "user",password: "password"])with{:ok,_,_}<-SSHEx.run(conn,"mkdir -p #{folder_name}"),{:ok,_,0}<-SSHEx.run(conn,"cp -Ru #{path_to_folder}#{folder_name}")doLogger.info("path: #{path_to_folder}\n file: #{folder_name}\n Move Complete."):okelse{:ok,reason,exit_num}whenexit_num>0->Logger.info("path: #{path_to_folder}\n file: #{folder_name} couldn't be moved to server \n reason: #{reason}"):error
It successfully connects and creates a folder on that server.
Below I've done an example cp command using System.cmd that works perfectly but the cp cmd using SSHEX.run command keeps giving me this error:
iex(62)>System.cmd("cp",["-Ru","priv/static/assets/videos/example","delete_folder"]){"",0}iex(63)>ExampleProject.ExampleModule.move_files_to_server("priv/static/assets/videos/example","example_folder"):erroriex(64)>[info]path: priv/static/assets/videos/examplefile: example_foldercouldn't be moved to server reason: cp: cannot stat ‘priv/static/assets/videos/example’: No such file or directory
And I'm not sure what I am doing wrong here.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am trying to copy a folder to my server using this command:
It successfully connects and creates a folder on that server.
Below I've done an example cp command using System.cmd that works perfectly but the cp cmd using SSHEX.run command keeps giving me this error:
And I'm not sure what I am doing wrong here.
The text was updated successfully, but these errors were encountered: