Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

amnonliberman

Re: Problem Deleting on remote server using console or batch

martin wrote:

I'm sorry for late answer. In GUI you are removing different files than in console. Can you post a log files showing removal of the same file?

Thanks from replying - the problem was found - it was case difference, outbox instead on Outbox.
martin

Re: Problem Deleting on remote server using console or batch

I'm sorry for late answer. In GUI you are removing different files than in console. Can you post a log files showing removal of the same file?
amnonliberman

Problem Deleting on remote server using console or batch

Hello

I am using WinScp 4.2.9 for sftp

When trying to delete a file on the remote server - using the GUI I am successful.
When using console rm command, either with single quote or without, I am unable to delete.
this the session console.
Searching for host...

Host does not exist
batch           on
confirm         off
Searching for host...
Connecting to host...
Authenticating...
Using username "****".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] ****@stageftp.fiftyone.com
/outbox/orders
Error deleting file '/outbox/orders/2011-01-24-14-55-34-PO-E4X000000495717.xml.a
sc'.
General failure (server should provide error description).
Error code: 4
Error message from server (en): error deleting file
Request code: 13
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort
drw-rw-rw-   3 user     group            0 Jan 31 11:22:41 2011 .
-rw-rw-rw-   1 user     group         6500 Jan 28 21:38:22 2011 2011-01-24-14-55
-34-PO-E4X000000495717.xml.asc
drw-rw-rw-   3 user     group            0 Jan 25 23:27:44 2011 Archive
-rw-rw-rw-   1 user     group         6500 Jan 28 10:23:27 2011 _2011-01-24-14-5
5-34-PO-E4X000000495717.xml.asc
winscp>


I am using the following command to invoke winscp:
c:\WinSCP\WinSCP.exe winscp.exe /console /script=fcom.txt /log="C:\winscp.log"


My Batch Script is as follow:

# Automatically answer all prompts negatively not to stall

# the script on errors
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
# open user:password@example.com
# Connect:
open sftp://User:Password@stageftp.fiftyone.com

# Change remote directory
cd /outbox/orders


rm  /outbox/orders/2011-01-24-14-55-34-PO-E4X000000495717.xml.asc
dir
#close
# Disconnect


I pasted my logs for the GUI here -
https://pastebin.com/5DJAVLx8
Console/batch Log -
https://pastebin.com/vXfGjcUp
Ini File
https://pastebin.com/JwL4UWqf