24 August 2024, 09:32 | #1 |
Registered User
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,274
|
Script Delete folder contents
I am no expert and would like to create a script to delete the contents of a folder using a Filerequester, the script must run on any volume
I've made this script but it doesn't work because I'm missing some parameters, can someone help me thanks ! Requestfile DRAWERSONLY TITLE Delete File C:Delete ALL |
24 August 2024, 15:33 | #2 |
Registered User
Join Date: Jun 2020
Location: Germany
Posts: 382
|
If you're fine with something very simple, this should work:
Code:
C:Delete `RequestFile TITLE "Select drawer" DRAWERSONLY` ALL |
24 August 2024, 18:39 | #3 | |
Registered User
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,274
|
Quote:
Perfect works fine, I needed it on AROS One to delete files from the .recycled folder Actually I just wanted to revert the folder, and thanks to you I was able to do so, this is the final scrip with the comfirmation request, thank you. Code:
RequestChoice >ENV:rcnum "Delete Recycled" "You want to empty Recycled" "_OK" "_Cancel" If $rcnum EQ "0" Quit Else Skip $rcnum EndIf EndIf LAB 1 C:Delete `RequestFile TITLE "Select drawer" FILESONLY` ALL >Nil: LAB 2 Quit |
|
24 August 2024, 19:20 | #4 |
Registered User
Join Date: Jun 2020
Location: Germany
Posts: 382
|
I don't know how compatible AROS is but you might be able to shorten your script to something like this:
Code:
If `RequestChoice "Delete Recycled" "You want to empty Recycled?" OK|Cancel` EQ 1 C:Delete `RequestFile TITLE "Select drawer" FILESONLY` ALL >Nil: EndIf |
24 August 2024, 23:44 | #5 |
Registered User
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,274
|
Excellent and thank you, your script works perfectly on AROS, the script is useful because if you have several partitions you will also have other .recycled, and you had to create several scripts, in addition, the desk is useful for cleaning other folders!
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Copy from script folder? | MickGyver | support.Other | 4 | 02 September 2019 21:54 |
Zipping a folder's content without the folder itself | Frankie | support.Apps | 0 | 14 September 2017 08:28 |
Is it possible to copy contents of an Amiga floppy disk to a (Windows) folder ? | aybe | support.Other | 19 | 25 June 2012 23:51 |
Reading Folder Contents To A Document | Djay | support.Apps | 5 | 17 September 2002 08:26 |
|
|