Jump to content

Recommended Posts

Posted (edited)

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
Posted (edited)

there are 2

1

FileOpenDialog ( "title", "init dir", "filter" [, options [, "default name"]] )

2

FileOpen ( "filename", mode )

See help files

8)

BTW... Welcome to the forums

Edited by Valuater

NEWHeader1.png

Posted

I am not sure I understand...

You mean this?

$sFoldername = @ProgramFilesDir
RunWait( "explorer.exe " & $sFoldername)
"I have discovered that all human evil comes from this, man's being unable to sit still in a room. " - Blaise Pascal
Posted

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)"] ??

Posted

@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)

Posted (edited)

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
Posted

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.

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
  • Recently Browsing   0 members

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