Jump to content
Sign in to follow this  

Getting file name (with the extension)

Recommended Posts



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 :)

Share this post

Link to post
Share on other sites

well that should work just fine

That's perfect!

thx :)

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