Topic "Deleting files"

Author Message
Guest




I want to remove all files in a specific directory on a remote machine and I am using sftp. My code looks like :

cd load/loadIn
ls
pwd
rm *.*

and I got the following errormessage:
rm /load/loadIn/*.*: no such file or directory

I have also tried to change the last line to delete files ending with .ok by writing :

rm *.ok

and I got the following errormessage:
rm /load/loadIn/*.ok: no such file or directory

So could anyone help me out to do this task ?

Regards
/Andreas
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
SFTP protocol itself does not support wildcards, unless your client supports them. What client are you using? Why you do not try WinSCP?
_________________
Martin Prikryl
Guest




prikryl wrote:
SFTP protocol itself does not support wildcards, unless your client supports them. What client are you using? Why you do not try WinSCP?


I have been told to use sftp by the client, because there are a lot of "secret" messages being sent over the net. The last step to be done is to delete the files on the remote machine that I have downloaded to the local one.

I know somehow that I have to do this recursively (i.e deleting the files), but I just dont know how ?

I have a batch-file calling the code above, but I dont know how to pass variables from it and receive them ?

Regards
/Andreas
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Anonymous wrote:
I know somehow that I have to do this recursively (i.e deleting the files), but I just dont know how ?

Well, use WinSCP Smile, not sftp.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License