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

fernanda.linsr

Re: Rename local directory files

martin wrote:

The mv command works with remote files only:
https://winscp.net/eng/docs/scriptcommand_mv

One solution is to directly download the files to the desired extension:
get *.temp *.txt

Or you can rename them in a wrapper batch file using the ren command, after WinSCP script finishes.


Thank you! That was very healpful! :D
martin

Re: Rename local directory files

The mv command works with remote files only:
https://winscp.net/eng/docs/scriptcommand_mv

One solution is to directly download the files to the desired extension:
get *.temp *.txt

Or you can rename them in a wrapper batch file using the ren command, after WinSCP script finishes.
fernanda.linsr

Rename local directory files

Hi!

I'm trying to run the script bellow and I need to rename the file from .temp to .txt after the download.

Can someone assist me?

cd /00_fidelity/00_recebimento/04_enriquecimento_kba/Bradesco
lcd C:\Users\HP\Desktop
mv *.txt *.temp
mget *.temp
rm *.temp
mv C:\Users\HP\Desktop\*.temp C:\Users\HP\Desktop\*.txt <- this doesn't work
exit