I'm trying to run two lines of commands using shell. I haven't been able to find a good source on how to actually execute shell in VBA. So far, I have been able to figure out how to open a specific directory.
Shell ("cmd.exe /k CD\Users\n808037\Desktop\OTHER")
Shell call runs in its own process, so you can't run separate commands by calling
Shell consecutively. Generally, you'd want to either run multiple commands as a batch file or script if you were going to do a lot of processing. In this case, just specify the full path for
copy. There's no need to change the working directory at all:
Shell "cmd.exe /k copy C:\Users\n808037\Desktop\OTHER\*.csv C:\Users\n808037\Desktop\OTHER\merged.csv"