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

martin

Re: Command line for moving files to another folder (ver. 5.19.2 on Windows OS)

Before you wrote that you want to move the files to C:\WinKboUtsending\Import\ANOTHER FOLDER, what is local path. Now you wrote "under /OUT/" – what is probably a remote path. So no, your question is still not clear.

Is this what you are after?
https://winscp.net/forum/viewtopic.php?t=28792
Ola

Re: Command line for moving files to another folder (ver. 5.19.2 on Windows OS)

Hi!
XML-files are downloading to /OUT/ every hour.
I download them to my local C:\WinKboUtsending\Import\

But I want to move the files also to another folder f ex under /OUT/

After copying and moving, the files will be deleted in the folder /OUT

Was this better to understand? Thanks for helping me! :)
martin

Re: Command line for moving files to another folder (ver. 5.19.2 on Windows OS)

I do not understand. Which files do you want to move? The downloaded files? So why don't you download them straight to C:\WinKboUtsending\Import\ANOTHER FOLDER?
Ola

Command line for moving files to another folder (ver. 5.19.2 on Windows OS)

Hello!
I am a new user of WinSCP. And now I need help for moving files. Here is my batch-file now:
"C:\Program Files\WinSCP\WinSCP.com" ^
  /log="C:\WinKboUtsending\WinScpLog\WinSCP.log" /ini=nul ^
  /command ^
    "open sftp://USERNAME:Hb.592-XXXXX@ADRESS/ -hostkey=""ssh-ed25519 256 HT7IB76+WWRiFuCwsl0HznfdI9kfGkk16HQtMY1ndoY=""" ^
    "get -delete /out/*.xml C:\WinKboUtsending\Import\"
 
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
  echo Success
) else (
  echo Error
)
exit /b %WINSCP_RESULT%

I want to move (not only copy!) files from C:\WinKboUtsending\Import\ and to
C:\WinKboUtsending\Import\ANOTHER FOLDER