Sign in to follow this  
Followers 0
nuclear

Open Folders

10 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



#2 ·  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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

I am not sure I understand...

You mean this?

$sFoldername = @ProgramFilesDir
RunWait( "explorer.exe " & $sFoldername)

you might be right... he did say "folder"

sorry

8)


NEWHeader1.png

Share this post


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

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

#7 ·  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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

even easier

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

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

@all..

yep that worked

thank you very much for all the answers

cya | nuclear

Share this post


Link to post
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
Sign in to follow this  
Followers 0