| 1. |
Solve : Execute all within the selected folder? |
|
Answer» I would like a script to open all the urls within a folder in tabs in the default browser, and any other launchable apps or documents in the folder with the default app. launcher. The task seems like an unrealistic explanation of what you want to do, and you seem to expect a solution to something that you aren't describing. I try this. A lot of windows, virtual machines, programs , documents collapsed my pc. After about of 20 minutes suffering i lost internet and reiniate the pc. Really don't seems a good code. The above code wouldn't have caused ANY of those issues...I am trying to analyze what happens. Seems everything on my desktop was executed. I have ten virtual machines about and only 4 GB RAm memory. Several pdf, word documents, and many folders. THUNDERBIRD messages. Too much load. Also execute several bats I have from good programmers to stop services and PROCESSES. Best Regards. 10 VM's on 1 PC with 4G of RAM ? ? There my friend is your issue right there... Quote from: patio on October 12, 2014, 12:24:56 PM 10 VM's on 1 PC with 4G of RAM ? ? I don't execute the VM at the same time..... But the script above did or try until collapse. I have other pc with 16 GB ram and i can have two or three virtual machines running at the same time. Best Regards Quote from: Esgrimidor on October 12, 2014, 12:16:59 PM I try this. BECAUSE BASED ON YOUR INITIAL DESCRIPTION, THAT IS WHAT YOU ASKED TO DO! Quote from: Esgrimidor on October 11, 2014, 01:29:21 PM I would like a script to open all the urls within a folder in tabs in the default browser, and any other launchable apps or documents in the folder with the default app. launcher. If you execute the script you were given it will do exactly what you describe to whatever is in the current folder! In this case, whatever is on your Desktop since you launched it from there! Quote from: Squashman on October 12, 2014, 12:51:57 PM BECAUSE BASED ON YOUR INITIAL DESCRIPTION, THAT IS WHAT YOU ASKED TO DO! Have you tried ? I will not try more. But a second try in a folder with eight url also collapsed my system. Endless console windows appearing and appearing. oh... Foxidrive forgot the if statement, though really not his fault. Sounded too much like homework to me, but here is the fix: Code: [Select]echo off for %%a in (*) do if not "%%a"=="%~nx0" start "" "%%a" pause It was opening itself each time it executed, though you should have been able to figure that one out if you had tried to debug it. Quote from: Lemonilla on October 12, 2014, 02:52:23 PM oh... Foxidrive forgot the if statement, though really not his fault. Sounded too much like homework to me, but here is the fix: Better wait a little more and try perhaps in a virtual machine or in a sandbox. Best Regards You need to think about your goal here...and re-state it as to what you want it to do...Or just keep it outside of the folder that is being processed and do a Change directory as the first LINE of code or a PUSHD. |
|