Welcome Guest

Pages: 1
Trash Items Function
liamk23PostSeptember 13, 2020, 13:06
Newbie
Posts: 16
Registered:
April 14, 2017, 15:43
Normal topicTrash Items Function

Hi,

I am wanting to use the trash items function within an action to delete all files within a folder but not the folder itself. I cannot figure out how i get the action function to just remove the files, it keeps deleting the folder also.

I have tried:
/Users/username/Downloads/coverDownloads/
/Users/username/Downloads/coverDownloads/*
/Users/username/Downloads/coverDownloads/*.*

All of the above deletes the 'coverDownloads' folder.

Please can you help with this? Thank you

liamk23PostSeptember 13, 2020, 13:24
Newbie
Posts: 16
Registered:
April 14, 2017, 15:43
Normal topicRe: Trash Items Function

You know I will just write a little script to run from the action, that way i can avoid sending to trash bin also, removing an additional step. Thank you

2MR2PostSeptember 13, 2020, 13:28
Avatar photo
Administrator
Posts: 2083
Registered:
August 23, 2012, 19:27
Normal topicRe: Trash Items Function

The Trash statement takes a list of files to be deleted. It is not directly associated with any loaded files. The following code snippet will do what you want:

Contents of Folder "~/Downloads" (Full paths of Files and Folders) to named variable 'contents'
Trash Items in "\<contents>"

liamk23PostSeptember 13, 2020, 13:31
Newbie
Posts: 16
Registered:
April 14, 2017, 15:43
Normal topicRe: Trash Items Function

nice! Legend. I knew the capability would be there. Cheers

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.016 seconds.