problem in script by winscp

Advertisement

Mahdi Bashiri
Joined:
Posts:
20

problem in script by winscp

Hi
i use below script to get all folders and files from my server to local hard disk inside specific path
winscp.com /command "option batch continue" "option confirm off" "open MyServer" "put / D:\Daily_Backup\yesterday\backup\vol\ "exit"
but after running i got this error:
C:\>winscp.com /command "option batch continue" "option confirm off" "open MyServer" "put / D:\Daily_Backup\yesterday\backup\vol\" "exit"
batch continue
confirm off
Connecting to MyServer ...
Connected with MyServer. Waiting for welcome message...
Connected
Starting the session...
Reading remote directory...
Session started.
Active session: [1] MyServer
/ | 0 KiB | 0.0 KiB/s | binary | 0%
Copying files to remote side failed.
Error creating folder '/vol/D:Daily_Backupyesterdaybackupvol/'.
Could not create directory "/vol/D:Daily_Backupyesterdaybackupvol"

i thought that i have mistake in synatx of command but i do not know where is my problem,please let me know and how can i fix that.

Regards,
Mahdi

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: problem in script by winscp

I support you want to use get, instead of put.

Reply with quote

Mahdi Bashiri
Joined:
Posts:
20

Re: problem in script by winscp

martin wrote:

I support you want to use get, instead of put.
yes excuseme, i want to download (get)
please help me

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: problem in script by winscp

So, did you try to replace the put with get? What is the error like now?
_________________
Martin Prikryl

Reply with quote

Mahdi Bashiri
Joined:
Posts:
20

Re: problem in script by winscp

martin wrote:

So, did you try to replace the put with get? What is the error like now?
so when i replaced , got below error:
C:\>winscp.com /command "option batch continue" "option confirm off" "open MyServer " "get / "D:\Daily_Backup\yesterday\backup\vol\"" "exit"
batch continue
confirm off
Connecting to MyServer ...
Connected with MyServer. Waiting for welcome message...
Connected
Starting the session...
Reading remote directory...
Session started.
Active session: [1] MyServer
Can't get attributes of file '/'.
File or folder '/' does not exist
.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: problem in script by winscp

And does your server have root folder (/)? E.g. if you login using GUI, can you browse all the way to the the root?
_________________
Martin Prikryl

Reply with quote

Mahdi Bashiri
Joined:
Posts:
20

Re: problem in script by winscp

martin wrote:

And does your server have root folder (/)? E.g. if you login using GUI, can you browse all the way to the the root?
Hi
myserver is novell netware server that ftp service is running. when connecting to myserver by winscp, shows "/sys/public" as first folder, so i change to remote directory in session to /vol and make /vol as root directory ( i d not know , does it correct").
therefore i use "/" as root because i make default remote directory as "/vol"

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: problem in script by winscp

Mahdi Bashiri wrote:

myserver is novell netware server that ftp service is running. when connecting to myserver by winscp, shows "/sys/public" as first folder, so i change to remote directory in session to /vol and make /vol as root directory ( i d not know , does it correct").
therefore i use "/" as root because i make default remote directory as "/vol"
It does not work like that. You need to use /vol.
_________________
Martin Prikryl

Reply with quote

Mahdi Bashiri
Joined:
Posts:
20

Re: problem in script by winscp

martin wrote:

Mahdi Bashiri wrote:

myserver is novell netware server that ftp service is running. when connecting to myserver by winscp, shows "/sys/public" as first folder, so i change to remote directory in session to /vol and make /vol as root directory ( i d not know , does it correct").
therefore i use "/" as root because i make default remote directory as "/vol"
It does not work like that. You need to use /vol.
my problem not solve
C:\>winscp.com /command "option batch continue" "option confirm off" "open MyServer" "get /vol "D:\Daily_Backup\vol\"" "exit"
batch continue
confirm off
Connecting to MyServer ...
Connected with MyServer. Waiting for welcome message...
Connected
Starting the session...
Reading remote directory...
Session started.
Active session: [1] MyServer
Can't get attributes of file '/vol'.
File or folder '/vol' does not exist.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: problem in script by winscp

Please attach a full log file showing the problem (using the latest version of WinSCP). Also attach a log showing how you browse into the /vol folder using GUI.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum