English Amiga Board


Go Back   English Amiga Board > Support > support.AmigaOS

 
 
Thread Tools
Old Today, 09:32   #1
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,272
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
AMIGASYSTEM is offline  
Old Today, 15:33   #2
EctoOne
Registered User
 
EctoOne's Avatar
 
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
EctoOne is offline  
Old Today, 18:39   #3
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,272
Quote:
Originally Posted by EctoOne View Post
If you're fine with something very simple, this should work:

Code:
C:Delete `RequestFile TITLE "Select drawer" DRAWERSONLY` ALL

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
AMIGASYSTEM is offline  
Old Today, 19:20   #4
EctoOne
Registered User
 
EctoOne's Avatar
 
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
EctoOne is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:17.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07155 seconds with 15 queries