Post a reply

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

MarcM

Re: Need to move the file instead of deleting it

Thanks for your Help Martin Really appreciate.

Marc
martin

Re: Need to move the file instead of deleting it

Yes, that looks good.
MarcM

Need to move the file instead of deleting it

Hi again,

do you think it would be possible to do 1 mv before to a temps folder, then do the get * on that temps folder and then mv to the archive folder? Like this maybe, do you think it would work?

/log="C:\"location of the LoG"\WinSCP.log" /ini=nul /command "open ftps://"Information of the Connection -certificate=""information of the certificate""" "cd /ftpRemoteFolder" "lcd C:\"location where I want to file to be"\Inbound" "mv * /tempFolder/*" "get /tempFolder/*" "mv /tempFolder/* /archive/*" "exit"
MarcM

Re: Need to move the file instead of deleting it

Hi Martin,

Thanks for your reply. How can I do that verify to make sure there's no new files?

Thanks for your help really appreciate.

Marc
martin

Re: Need to move the file instead of deleting it

Yes, it looks good. Of course, you must be sure that no new file is created between get and mv.
MarcM

Need to move the file instead of deleting it

Since this script is in production I need to be sure of my change if I do this do you think it would work
I have added the mv.... and removed the -delete
/log="C:\"location of the LoG"\WinSCP.log" /ini=nul /command "open ftps://"Information of the Connection -certificate=""information of the certificate""" "cd /ftpRemoteFolder" "lcd C:\"location where I want to file to be"\Inbound" "get *" "mv * /archive/*" "exit"

the archive folder is at the same level of the ftpRemoveFolder.

thanks for your help

Marc
MarcM

Need to move the file instead of deleting it

Good day All,

I'm new with WinSCP and I manage to do this line when calling the program by my Task Manager.
But I need to move the file to another folder instead of deleting it could anyone help me please.

this is what I have :
/log="C:\"location of the LoG"\WinSCP.log" /ini=nul /command "open ftps://"Information of the Connection -certificate=""information of the certificate""" "cd /ftpRemoteFolder" "lcd C:\"location where I want to file to be"\Inbound" "get -delete *" "exit"
I'm trying to include a MV instead of the -delete but it's not in the working at all

thanks for your help

Marc