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
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