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

Guest

Re: Scripting - Delete all files and directories

[quote="Anonymous"]

martin wrote:

Confuzed wrote:

I want my script to delete the entire contents of the remote working directory, files AND subdirectories.

That's not possible currently. But you can remote the whole directory and create new empty one.


Nevermind... I figured it out... just did a
call rm -f -r -v *

and the files are gone!

Thanks again for a great product.

I'll try and convince my boss to donate!

Joe
Guest

Re: Scripting - Delete all files and directories

Anonymous wrote:


I did a "help option" and the only thing I can see that MAY help is the abort option. Would the inablity to open the remote directory I specify in the script result in an error that would cause the abort?


Just tested that and it does... now I just need to find a way to recursively delete all files and directories under the remote working directory.
Guest

Re: Scripting - Delete all files and directories

martin wrote:

Confuzed wrote:

I want my script to delete the entire contents of the remote working directory, files AND subdirectories.

That's not possible currently. But you can remote the whole directory and create new empty one.


I'm not sure I follow you... could you explain a little clearer?

martin wrote:

Also, what happens if the remote working directory specified by the 'cd' command in my script is missing... does it default to something,or fail the script.

That depends on configuration. See "help option" for "batch" option.


I did a "help option" and the only thing I can see that MAY help is the abort option. Would the inablity to open the remote directory I specify in the script result in an error that would cause the abort?

By the way, great product... I absolutely love people inspired enough to produce a valuable product for free... I love them even more when they offer such responsive support!
martin

Re: Scripting - Delete all files and directories

Confuzed wrote:

I want my script to delete the entire contents of the remote working directory, files AND subdirectories.

That's not possible currently. But you can remote the whole directory and create new empty one.

Also, what happens if the remote working directory specified by the 'cd' command in my script is missing... does it default to something,or fail the script.

That depends on configuration. See "help option" for "batch" option.
Confuzed

Scripting - Delete all files and directories

I want my script to delete the entire contents of the remote working directory, files AND subdirectories.

It errors on the "rm *" if there is a directory in the remote working directory, and it appears that rmdir will not accept a wildcard.

I have tried both sftp and scp with no luck. Please advise.

Also, what happens if the remote working directory specified by the 'cd' command in my script is missing... does it default to something,or fail the script. I would hate to run the 'rm *' in the wrong directory!

Thanks,

Joe