08 October 2010, 01:31 | #1 |
Junior Member
Join Date: Dec 2002
Location: The Streets
Age: 40
Posts: 2,731
|
Is there a WB command at all that can...
...delete a directory and all of its contents (including recursive subdirectories) at once? Basically something akin to the "RD" command in Windows.
|
08 October 2010, 01:35 | #2 |
Wipe-Out Enthusiast
Join Date: Nov 2005
Location: .
Age: 43
Posts: 2,545
|
delete directoryname#? all ... maybe?
i dont really want to test it thanks! edit: - yep, seems to do the trick |
08 October 2010, 01:49 | #3 |
Junior Member
Join Date: Dec 2002
Location: The Streets
Age: 40
Posts: 2,731
|
Yup, ultimately googled a bit for it. I is stupid.
|
08 October 2010, 04:22 | #4 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,661
|
YEah that works. But it's quite unsafe.
|
08 October 2010, 04:27 | #5 |
Junior Member
Join Date: Dec 2002
Location: The Streets
Age: 40
Posts: 2,731
|
True say, but so long as you're only deleting temp directories in, say, RAM:, it's alright.
Okay, another question (just so I don't start yet another thread)... How do I make a script that executes a specific command on a file-by-file basis? Say something like this IPF2ADF script, but rather than do a file requester, I want WWarp to convert each file one by one, utilising the same script/command. Basically something akin to the "if" command in DOS/Windows (if anyone knows about it). |
08 October 2010, 04:39 | #6 |
Unregistered User
Join Date: Nov 2005
Location: Tasmania
Age: 42
Posts: 893
|
IF, ELSE and ENDIF, as well as ASK and some other such commands are all part of the standard workbench and should be in the C directory.
Personally I find DOpus great for all my file operations. |
08 October 2010, 08:38 | #7 | |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,036
|
Quote:
Code:
set source `requestfile drawersonly` set dest `requestfile drawersonly savemode` list >ram:tempscript "$source" files p=#?.adf lformat="adf2ipf *"%p%n*" *"$dest%m.ipf*"" execute ram:tempscript |
|
08 October 2010, 20:19 | #8 | |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,661
|
Quote:
As far as I remember, there's no ARE YOU SURE? prompt on that. |
|
08 October 2010, 20:33 | #9 |
HOL/FTP busy bee
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 32,192
|
Yeah, it should have a 'ARE YOU SURE?' and another 'REALLY???' prompt for every delete How times have changed
|
08 October 2010, 20:41 | #10 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,036
|
That's not Windows where it asks you if you are sure when you change the position of the mouse. If you use a DOS shell, you should know what you are doing.
rm -R something does not ask, too. |
08 October 2010, 21:07 | #11 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,661
|
That's why I said, it is dangerous in the hands of the stupid.
:P |
08 October 2010, 21:51 | #12 |
HOL/FTP busy bee
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 32,192
|
Wait, did you just called MG a... nvm
|
09 October 2010, 10:28 | #13 |
The 1 who ribbits
|
ok of topic but how many of us here use the recycle bin I dont
when I delete something I want it to stay deleted ..... |
09 October 2010, 11:59 | #14 |
Registered User
Join Date: Sep 2010
Location: Telford / England
Posts: 38
|
delete "temp#?" all
...will delete the directory called 'temp' and all contents. It will also delete any file in the current folder beginning with 'temp...' and any other directories beginning with 'temp...' and all of their contents! |
09 October 2010, 12:04 | #15 |
HOL/FTP busy bee
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 32,192
|
Why would you add '#?' anyway? Doesn't make much sense if you only what to delete temp and its contents.
|
09 October 2010, 12:50 | #16 |
The 1 who ribbits
|
format c: oh err wrong os sorry
|
09 October 2010, 12:56 | #17 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,036
|
There is a difference between dangerous and unsafe. If delete command was unsafe, it would not work correctly, i.e. it would delete things you didn't tell it. But it does not do this, so it is completely safe. It's dangerous as you can tell it to delete important files and it will do that. But it's completely safe to use as long as you are careful in what you tell it to delete.
The temp#? example belongs into the category of stupid users. If you don't understand how paths and wildcards work, you should not use the DOS shell. Stay with DirOpus or such programs then. And keep away from shell scripts. |
09 October 2010, 12:57 | #18 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,036
|
|
09 October 2010, 14:43 | #19 |
The 1 who ribbits
|
dos command so assume we are in dos and not windows, but you are right
the only dangerus command I can think of was a poke on some cbm pet that overloaded something and could set it on fire, though may be a miff |
09 October 2010, 23:13 | #20 |
Junior Member
Join Date: Dec 2002
Location: The Streets
Age: 40
Posts: 2,731
|
Thanks for the layout, thomas! But the script I'm looking to process takes up more than one line, and I'm having a fair amount of trouble getting "list" to create the list of commands correctly, so I'm thinking of something else.
Do you know if AmigaDOS has anything like the %1, %2 etc references in DOS/Windows, if you wish to execute a batch/script file while adding references to a file/directory at the end? Something like, oooh, this random CMD example: Code:
adf2adz "blah.adf" "blah.adz" Basically I want to do something like that with the Amiga, but in connection with what you gave me in your post in regards to searching for ipfs and referencing them in a series of commands. If that makes any sense at all. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Final Command | runamuck2 | support.Games | 7 | 13 September 2019 16:17 |
What is the WB command that..... | MethodGit | request.Other | 4 | 08 October 2010 04:21 |
Install command | mai | support.Other | 9 | 09 December 2009 15:33 |
New Carrier Command | -=ARA=- | Retrogaming General Discussion | 12 | 18 September 2009 10:37 |
help with delete command | silkworm | New to Emulation or Amiga scene | 2 | 09 December 2004 19:14 |
|
|