I couldn't get this sub to work so I've made some changes to it but I no longer have access to a MAC to test on. Can someone test this for me or tell me a way of downloading and renaming a file and then specifying its path while on MAC?
osxdaily.com
osxdaily.com
![osxdaily.com](/board/proxy.php?image=https%3A%2F%2Fcdn.osxdaily.com%2Fwp-content%2Fuploads%2F2014%2F02%2Fterminal-icon.png&hash=3db38eac278a97e22e488b8e4bb0ed7a&return_error=1)
Download Files from the Web via the Mac OS X Command Line
I am frequently developing web pages and often times I find it frustrating when I can not restart my browser because I’m in the middle of a download. So when I need to download a large file a…
![osxdaily.com](/board/proxy.php?image=https%3A%2F%2Fcdn.osxdaily.com%2Fwp-content%2Fuploads%2F2019%2F09%2Fcropped-apple-touch-icon-104-32x32.png&hash=301317240a0a2ca957120627b9eb8599&return_error=1)
![osxdaily.com](/board/proxy.php?image=https%3A%2F%2Fcdn.osxdaily.com%2Fwp-content%2Fuploads%2F2014%2F02%2Fterminal-icon.png&hash=3db38eac278a97e22e488b8e4bb0ed7a&return_error=1)
Download Files from the Web via the Mac OS X Command Line
I am frequently developing web pages and often times I find it frustrating when I can not restart my browser because I’m in the middle of a download. So when I need to download a large file a…
![osxdaily.com](/board/proxy.php?image=https%3A%2F%2Fcdn.osxdaily.com%2Fwp-content%2Fuploads%2F2019%2F09%2Fcropped-apple-touch-icon-104-32x32.png&hash=301317240a0a2ca957120627b9eb8599&return_error=1)
VBA Code:
Sub Testing_Procedure()
MAC_Download "https://www.cftc.gov/dea/newcot/deacom.txt", "MoshiM_CF.txt"
End Sub
Public Sub MAC_Download(URL As String, File_Name As String)
Dim Curl_2_Run As String', Downloads_Folder As String
'Const Folder_Path = "downloads folder"
'Downloads_Folder = MacScript("return (path to " & Folder_Path & ") as string")
Curl_2_Run = "cd ~/Desktop; curl -o " & File_Name & " " & URL '<--------Download and rename file.. save to desktop
MacScript Curl_2_Run
End Sub