harryz Posted August 27, 2017 Report Share Posted August 27, 2017 I'm using Ketarin 1.8.7 on Windows 10 1703. I only use it for keeping my installation files up-to-date (don't install anything using Ketarin). For some of the applications, I need to copy one or more of the files to a couple of different locations on my machine (local drives, not a network drive). Here's what the "after downloading" commands look like: =================== "C:\Program Files\7-Zip\7z.exe" x "{file}" -o"{file:directory}" -y copy "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexp64.exe" "D:\Haole Boy\$USB files and folders\$ Tools\$ Remote Tools" copy "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexpl.reg" "D:\Haole Boy\$USB files and folders\$ Tools\$ Remote Tools" copy "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexp64.exe" "C:\Tools" =================== When in the edit window, I can click 'Run' and I get a window message box saying that the script executed successfully. When I look at the various directories involved, I can see that the unzip command worked, but none of the following commands succeeded. I'm not sure if they are not actually executed or if they fail for some reason. If I "rem" out the first command, the 2nd command works, but the 3rd and 4th do not. Same if I 'rem' out the first 2 commands the 3rd works, etc. I've copied the 2nd - 4th lines into a .bat file and it executes the commands without an error, so I don't think I have a syntax problem. I'll be happy to collect whatever documentation you need, just tell me what and how to do it. Mahalo! (Thank You!) Harry Z Link to comment Share on other sites More sharing options...
necrox Posted August 29, 2017 Report Share Posted August 29, 2017 Aloha! Would it be possible to post the contents of the log file? Is $ Remote Tools an existing directory? Add a backslash \ to the end of your folder names and try it again. COPY /V /Y "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexp64.exe" "D:\Haole Boy\$USB files and folders\$ Tools\$ Remote Tools\" COPY /V /Y "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexpl.reg" "D:\Haole Boy\$USB files and folders\$ Tools\" COPY /V /Y "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexp64.exe" "C:\Tools\" If the file path never changes and to keep the script area clean, you can use global variables. If you do not always want to write D:\Haole Boy\$USB files and folders\, you can shorten it to something like {haoleboy}. Open your settings (CTRL + T), switch to Global variables, create a variable called haoleboy, for example. Add D:\Haole Boy\$USB files and folders as value. If you want to use a script the next time, you can shorten it. COPY /V /Y "{haoleboy}\$ Tools\Process Explorer\procexp64.exe" "{haoleboy}\$ Tools\$ Remote Tools\" COPY /V /Y "{haoleboy}\$ Tools\Process Explorer\procexpl.reg" "{haoleboy}\$ Tools\" COPY /V /Y "{haoleboy}\$ Tools\Process Explorer\procexp64.exe" "C:\Tools\" Same for 7zip. Create a variable called 7z for example and set the value to C:\Program Files\7-Zip\7z.exe If you want to use 7zip the next time, then you can do it like this: "{7z}" x "{file}" -o"{file:directory}" -y Link to comment Share on other sites More sharing options...
shawn Posted September 3, 2017 Report Share Posted September 3, 2017 you could also add "C:\Program Files\7-Zip\" to the path then just use 7z.exe Link to comment Share on other sites More sharing options...
harryz Posted September 18, 2017 Author Report Share Posted September 18, 2017 Mahalo for the replies. Sorry for the delay in responding, but I did not receive a notification that there was a reply. I will test out your suggestions and provide an update. Harry Z. Link to comment Share on other sites More sharing options...
harryz Posted September 19, 2017 Author Report Share Posted September 19, 2017 On 8/28/2017 at 8:45 PM, necrox said: Aloha! Would it be possible to post the contents of the log file? Is $ Remote Tools an existing directory? Add a backslash \ to the end of your folder names and try it again. COPY /V /Y "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexp64.exe" "D:\Haole Boy\$USB files and folders\$ Tools\$ Remote Tools\" COPY /V /Y "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexpl.reg" "D:\Haole Boy\$USB files and folders\$ Tools\" COPY /V /Y "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexp64.exe" "C:\Tools\" If the file path never changes and to keep the script area clean, you can use global variables. If you do not always want to write D:\Haole Boy\$USB files and folders\, you can shorten it to something like {haoleboy}. Open your settings (CTRL + T), switch to Global variables, create a variable called haoleboy, for example. Add D:\Haole Boy\$USB files and folders as value. If you want to use a script the next time, you can shorten it. COPY /V /Y "{haoleboy}\$ Tools\Process Explorer\procexp64.exe" "{haoleboy}\$ Tools\$ Remote Tools\" COPY /V /Y "{haoleboy}\$ Tools\Process Explorer\procexpl.reg" "{haoleboy}\$ Tools\" COPY /V /Y "{haoleboy}\$ Tools\Process Explorer\procexp64.exe" "C:\Tools\" Same for 7zip. Create a variable called 7z for example and set the value to C:\Program Files\7-Zip\7z.exe If you want to use 7zip the next time, then you can do it like this: "{7z}" x "{file}" -o"{file:directory}" -y Yes, "$ Remote Tools" already exists. Adding the trailing backslash did not resolve the problem (i.e. no error messages received from the "Run" dialog, and the files were not copied to the intended directory) Thanks for the tip on the global variables. Will implement them after I get these copy commands to work. Harry Z Link to comment Share on other sites More sharing options...
shawn Posted September 29, 2017 Report Share Posted September 29, 2017 I use file redirection and logging all the time for troubleshooting this kind of thing. Change your commands from this: "C:\Program Files\7-Zip\7z.exe" x "{file}" -o"{file:directory}" -y copy "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexp64.exe" "D:\Haole Boy\$USB files and folders\$ Tools\$ Remote Tools" copy "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexpl.reg" "D:\Haole Boy\$USB files and folders\$ Tools\$ Remote Tools" copy "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexp64.exe" "C:\Tools" To this: echo.Current directory: "%cd%">>\logs\ketarin.log echo."C:\Program Files\7-Zip\7z.exe" x "{file}" -o"{file:directory}" -y >>\logs\ketarin.log echo.copy "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexp64.exe" "D:\Haole Boy\$USB files and folders\$ Tools\$ Remote Tools">>\logs\ketarin.log echo.copy "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexpl.reg" "D:\Haole Boy\$USB files and folders\$ Tools\$ Remote Tools">>\logs\ketarin.log echo.copy "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexp64.exe" "C:\Tools">>\logs\ketarin.log It amounts to adding a new line above it all that documents the current working directory then adding "echo." to the beginning of every line, and ">>\logs\ketarin.log" to the end of every line. Run it. Then open "\logs\ketarin.log" to see the exact commands that would have been run. This might help you figure out why it's misbehaving. Open a command prompt, switch to that directory, then run the commands and see why it's not behaving. For example, it could be that you're assuming the path that stuff is running from, and that's creating problems for you. Or it could be that you're running "7z x" when you really mean to run "7z e" - and this will show you exactly how that is causing problems. Good luck! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now