Jump to content

Path create.


Recommended Posts

Hello,

Until now i was using this script to create a path

$sPath = StringReplace(@DesktopDir, "\AutoIt3.exe", "\")
$aFiles = _FileListToArray($sPath, "*.*", 1)
  For $i = 1 To $aFiles[0]
   GUICtrlSetData($List1, $aFiles[$i])
  Next

What can i do in case i want the Path to be something like this????

C:\Program Files\Java\jre6\bin

I feel nothing.It feels great.

Link to comment
Share on other sites

Bruce

actually i just did it liek this and it works fine

$sPath = "C:Program FilesJavajre6bin"
$aFiles = _FileListToArray($sPath, "*.*", 1)

Thanks anyway

Edited by ileandros

I feel nothing.It feels great.

Link to comment
Share on other sites

ileandro, you will want to use @programsdir if you are distributing the script.

Not all program files directories are c;/program files/x

You have to take into account the Home Drive and 64 bit systems. So @programsdir is a sure fire way to find c:/program files

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...