ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: .exe to check for a file/folder existance and act accordingly

(1/2) > >>

sri:
Hi all,

I am requesting for a tiny program (.exe) that would check for existance of a file/folder on the user's computer and prompt them for a download if they don't have it.

It should have the following input boxes:

1. Path of the file/folder to check (Ex.: C:\Program Files\AvaFind)

2. If present, the path to a file/folder to launch (Ex.: C:\%ProgramFiles%\blah\congrats.html)

3. If Not Present, path to a file/folder to launch (Ex.: c:\program files\internet explorer\iexplore.exe http://www.google.com/search?q=AvaFind)

If not a GUI, a file that can be edited by a text editor with the above modifiable parameters would work as well.

Thanks for any help.

jgpaiva:
Here's a small script i made for this:
.ahk version
.exe version
It's called CheckForFile and works with command line parameters:


--- ---CheckForFile.exe [FileToFind] [RunIfFound] [RunIfNotFound]
[FileToFind] is the file you want to check for existence,
[RunIfFound] is the comand you'd like it to run in case it found the file (can be a file, an url, etc)
[RunIfNotFound] is the command you'd like it to run in case it didn't find the file.

sri:
jgp,

Can you pls give me another version of the script which checks to see if the file is already running (open)?

i.e, check is to be done to see if a file is running and not to see if it exists.

Thanks.

jgpaiva:
Sure, that's easy. Only notice that it'll only work by the name of the process. It cannot detect if it's a specific file under a specific path.
It works in the exact same way as the other one, only that instead of passing it the path to the file, you pass it the name of the executable.

sri:
Thanks for that but I was actually looking for a prog (.exe) that will check if a specific file (at the same location as the .exe) is open.

Navigation

[0] Message Index

[#] Next page

Go to full version