cubax Posted May 22, 2007 Share Posted May 22, 2007 Hello, I have a simple script wich copies a file from the user machine to another position....: First, I open a fileDialog window to let the user choose the file: $fileToMove = FileOpenDialog ("Select the file", "C:\", "All (*.*)") Second, I get the file name using the _GetExtProperty function found here into this forum $prop = _GetExtProperty($fileToMove,-1) And I expect to have here the filename $onlyFileName = $prop[0] It works perfectly on my PC but not on another one where is returned only the filename without the extension. Is there a way to make it work as it is or is there a way to get only the full filename (without the path (example C:\)) Thanks Link to comment Share on other sites More sharing options...
Zedna Posted May 22, 2007 Share Posted May 22, 2007 (edited) #include <file.au3> #include <array.au3> Dim $szDrive, $szDir, $szFName, $szExt $TestPath = _PathSplit(@ScriptFullPath, $szDrive, $szDir, $szFName, $szExt) _ArrayDisplay($TestPath,"Demo _PathSplit()") Edited May 22, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Gif Posted May 22, 2007 Share Posted May 22, 2007 #include <file.au3> #include <array.au3> Dim $szDrive, $szDir, $szFName, $szExt $TestPath = _PathSplit(@ScriptFullPath, $szDrive, $szDir, $szFName, $szExt) _ArrayDisplay($TestPath,"Demo _PathSplit()") well that should work just fine Link to comment Share on other sites More sharing options...
cubax Posted May 22, 2007 Author Share Posted May 22, 2007 well that should work just fineThat's perfect!thx Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now