Jump to content

Open Folders


Recommended Posts

hi there,

i was wondering if there is a command to open a folder (such as C:\folder XY\) without opening a program.

i tried it with the Run("xyz") command but there is always an error message, so i think it isnt possible with that command...

is there a different way to do this??

[sry if there are mistakes in my post but i'm not english ;) ]

cya | nuclear

Edited by nuclear
Link to comment
Share on other sites

thx@all for the fast answers...

@NightGaunt:

yes I think I meant this.

so, for example, when I want to open the folder E:\Programme\funnyfiles what do i have to do?

what do i have to change [from "$sFoldername = @ProgramFilesDir RunWait( "explorer.exe " & $sFoldername)"] ??

Link to comment
Share on other sites

@nuclear

Again welcome to the forums!

$sFolderName = "E:\Programme\funnyfiles\"
Run("explorer.exe" & $sFolderName)

The above code should get you setup. If it doesnt let me know what you are having trouble with.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

thx@all for the fast answers...

@NightGaunt:

yes I think I meant this.

so, for example, when I want to open the folder E:\Programme\funnyfiles what do i have to do?

what do i have to change [from "$sFoldername = @ProgramFilesDir RunWait( "explorer.exe " & $sFoldername)"] ??

$sFoldername = "E:\Programme\funnyfiles"
Runwait ("explorer.exe " & sFoldername)

$sFolderName is the variable of the folder you want to point to. You can put whatever you want between the quotes and it will open that. I just chose @ProgramFilesDir out of convenience.

The command Runwait ("explorer.exe " & sFoldername) is exactly the same as typing Explorer.exe E:\Programme\funnyfiles in to your RUN box in Windows.

If you want to do more stuff it is a good idea to try and read the help files as much as you can, or go through code samples. It may be harder if you do not know English well, but it may still help.

Edited by NightGaunt
"I have discovered that all human evil comes from this, man's being unable to sit still in a room. " - Blaise Pascal
Link to comment
Share on other sites

The easiest way is to run explorer using the file name as an argument. For example, to open

the Programs Folder, type the following:

Run("C:\Windows\Explorer.exe C:\Program Files")

Leave a space after the "exe" part above.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...