 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
ricke
Joined: 14 Sep 2006 Posts: 31
|
Posted: Mon May 07, 2007 10:17 am Post subject: SplitPath not working as intended ? |
|
|
place = C:\test\folder1\message.txt
SplitPath, place , OutFileName
msgbox, %OutFilename%
The above returns "message.txt" which is correct.
place = C:\test\folder1
SplitPath, place , OutFileName
msgbox, %OutFilename%
This returns "folder1"..... problem.
This could be a file named "folder1" with no extension.... but in this case it was a folder.... but Splitpath returned it like a file =/
Is there anyway to check if "C:\test\folder1" points to a file or a folder ?
Thought Splitpath would take care of it... but it seems it just split up a string and never actually check to see if it is file or a folder.
help plx =) |
|
| Back to top |
|
 |
Helpy Guest
|
Posted: Mon May 07, 2007 10:32 am Post subject: |
|
|
You guessed right, SplitPath is a string operation, independent of the file system. It can even be used with URLs... Or paths on non-connected drives, and so on.
To check wheter you have a file or a directory, use the FileExist() function. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|