rm * with exception some file how to ??

Advertisement

rongsoft
Joined:
Posts:
2
Location:
Thailand

rm * with exception some file how to ??

Hello,

I quite newbie here. I want to use winscp to transfer the file
across network. I give authority the user to put some file in some folder
then i have winscp to do winschedule task collect all those file move to
destination somewhere after i use script below i found error on thumbs.db
winscp cannot delete file what is the best way to solve please advice.

my script below
option confirm off
option batch continue
open ftp://User:Passwrd:IP:Port/
cd /
lcd /
lcd p:\application\FTP_Backoffice\out
cd Backoffice\out
rm *
put *

Reply with quote

Advertisement

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

Re: rm * with exception some file how to ??

You cannot exclude specific file with rm command.

What does it mean "file move to destination somewhere"? How do you do that?

Reply with quote

rongsoft
Joined:
Posts:
2
Location:
Thailand

Re: rm * with exception some file how to ??

martin wrote:

You cannot exclude specific file with rm command.

What does it mean "file move to destination somewhere"? How do you do that?

Ok, I see thank you for your reply.
but if I want to clear all file at the destination directory before I put
instead of "rm" command.
what is the best way to do ?

Reply with quote

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

Re: rm * with exception some file how to ??

I'm not sure I understand what you ask for.

To delete all files in remote directory, use rm *

But you know that already.

Reply with quote

Advertisement

You can post new topics in this forum