Search found 8 matches
- 03 Jan 2023 16:26
- Forum: DOS Batch Forum
- Topic: How to loop through drive letters to run my script
- Replies: 16
- Views: 22427
Re: How to loop through drive letters to run my script
--- The system cannot find the path specified. The system cannot find the path specified. --- The system cannot find the path specified. The system cannot find the path specified. --- Volume in drive E is Seagate Skyhawk 3TB Volume Serial Number is AA95-32F6 Directory of E:\Dropbox\AHK 23-01-04 06:...
- 31 Dec 2022 20:21
- Forum: DOS Batch Forum
- Topic: How to loop through drive letters to run my script
- Replies: 16
- Views: 22427
Re: How to loop through drive letters to run my script
Hi there, I tried the code below and it only launches the first script, but not the 2nd one. Weird part is cmd doesn't print anything at all even though it's supposed to before launching my script. @echo off for %%f in (C D E F) do if exist "%%f:\Dropbox\AHK\Autohotkey.ahk" if exist "%%f:\Dropbox\AH...
- 29 Dec 2022 21:27
- Forum: DOS Batch Forum
- Topic: How to loop through drive letters to run my script
- Replies: 16
- Views: 22427
Re: How to loop through drive letters to run my script
understand.
so when using this below, it only launches the first script, and not the second/third script. why is that so and how do I fix it?
so when using this below, it only launches the first script, and not the second/third script. why is that so and how do I fix it?
Code: Select all
@for %%f in (C D E) do %%f:\Dropbox\AHK\Autohotkey.ahk&%%f:\Dropbox\AHK\TextExpansion.ahk&%%f:\Dropbox\AHK\Emojis.ahk
- 29 Dec 2022 02:23
- Forum: DOS Batch Forum
- Topic: How to loop through drive letters to run my script
- Replies: 16
- Views: 22427
Re: How to loop through drive letters to run my script
E:\Dropbox\AHK>echo --- & dir C:\Dropbox\AHK\Autohotkey.ahk & dir C:\Dropbox\AHK\TextExpansion.ahk & pause --- The system cannot find the path specified. The system cannot find the path specified. Press any key to continue . . . this shows there's no looping as it only tried C: and did not try D / ...
- 26 Dec 2022 05:31
- Forum: DOS Batch Forum
- Topic: How to loop through drive letters to run my script
- Replies: 16
- Views: 22427
Re: How to loop through drive letters to run my script
Using this @for %%f in (C D E F) do echo ---&dir %%f:\Dropbox\AHK\Autohotkey.ahk&dir %%f:\Dropbox\AHK\TextExpansion.ahk only flashes the cmd window briefly with NO text whatsoever. I also noticed no scripts are launched for that matter. I run .ahk files by simply double clicking on them, it works ex...
- 22 Dec 2022 06:00
- Forum: DOS Batch Forum
- Topic: How to loop through drive letters to run my script
- Replies: 16
- Views: 22427
Re: How to loop through drive letters to run my script
I don't know how AHK works (their syntax and how you call the scripts) but I guess you could use something like this: This code will check if both .ahk files exist. If *both* exist it will first run first .ahk file and then the second one. @for %%f in (C D E F) do if exist %%f:\Dropbox\AHK\Autohotk...
- 19 Dec 2022 19:12
- Forum: DOS Batch Forum
- Topic: How to loop through drive letters to run my script
- Replies: 16
- Views: 22427
Re: How to loop through drive letters to run my script
Sorry for the noob question, but how do I run a script? what's the command? I tried like this but it doesn't work:
Code: Select all
@echo off
for %%f in (C D E F)
{
do %%f:\Dropbox\AHK\Autohotkey.ahk
do %%f:\Dropbox\AHK\TextExpansion.ahk
}
- 14 Dec 2022 23:04
- Forum: DOS Batch Forum
- Topic: How to loop through drive letters to run my script
- Replies: 16
- Views: 22427
How to loop through drive letters to run my script
I have 5 scripts in my AutoHotkey folder that I need to run as a batch in .bat. The drive letters are different on different PCs. How do I loop through drive letters to find the right files? sample Loop, Parse,% "CDEF" IF FileExist(Dir := A_LoopField ":\Dropbox\AHK\") { Run, %Dir%Autohotkey.ahk Run,...