Jump to content

Getting file name (with the extension)


Recommended Posts

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

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