Hello!
We're currently moving from W10 to MacOS in my company and I'm trying to "translate" some VBA scripts we have. I'm having trouble with this one script that is used to delete files with +37 days (due to GDPR) on MacOS, and since I can't use FileSystemObject I created a .sh file that does that exact thing, but I need that to be assigned to a macro on the workbook.
I've tried different things, the file is on 757 permissions and I tried calling it a bunch of different ways and I get a "file not found" error when I run my macro (script works fine in terminal).
Code:
I need the file path to be dynamic due to this being on a sharepoint folder and we sometimes move files around and are still organizing our folders.
Thank you in advance for any help given!
We're currently moving from W10 to MacOS in my company and I'm trying to "translate" some VBA scripts we have. I'm having trouble with this one script that is used to delete files with +37 days (due to GDPR) on MacOS, and since I can't use FileSystemObject I created a .sh file that does that exact thing, but I need that to be assigned to a macro on the workbook.
I've tried different things, the file is on 757 permissions and I tried calling it a bunch of different ways and I get a "file not found" error when I run my macro (script works fine in terminal).
Code:
VBA Code:
Sub Mac_Delete()
Dim DelScript As String
Dim ScriptPath As String
ScriptPath = ActiveWorkbook.Path & Application.PathSeparator
DelScript = ScriptPath & "DeletionScript.sh"
RetVal = Shell(DelScript, vbNormalFocus)
I need the file path to be dynamic due to this being on a sharepoint folder and we sometimes move files around and are still organizing our folders.
Thank you in advance for any help given!