| View previous topic :: View next topic |
| Author |
Message |
Rumbah
Joined: 30 Mar 2005 Posts: 10
|
Posted: Sun May 15, 2005 12:31 am Post subject: A_LoopFileLongPath does not work if the file does not exist |
|
|
Hi!
I found a problem with getting long file names.
My Script:
Loop %ResultMPGFile%
ResultMPGFile = %A_LoopFileLongPath%
Now, %ResultMPGFile% is something like
C:\DOKUME~1\Jan\LOKALE~1\Temp\X79f152b0-02e4-4a38-828b-a78fefde431a.mpv
The problem is that the file does not exist because it will be the output filename of an encoding job that is called by the script and %A_LoopFileLongPath% simply contains
C:\DOKUME~1\Jan\LOKALE~1\Temp\X79f152b0-02e4-4a38-828b-a78fefde431a.mpv
.
I hope it can be fixed so that the encoder can be called with the full output name.
Rumbah |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Sun May 15, 2005 1:57 am Post subject: Re: A_LoopFileLongPath does not work if the file does not ex |
|
|
| Rumbah wrote: | | The problem is that the file does not exist because it will be the output filename of an encoding job | If you mean that the file doesn't yet exist at all in the file system, I don't think there's any way to find out the long path. If this is the situation, it seems impossible that you could know the short filename because the OS will decide it only when the file is actually created.
But if the file does exist and A_LoopFileLongPath isn't working for you, please give more details. |
|
| Back to top |
|
 |
Rumbah
Joined: 30 Mar 2005 Posts: 10
|
Posted: Sun May 15, 2005 2:19 pm Post subject: |
|
|
No, the file does not exist, but the directories do. My script works anyway, as the short path will also be accepted by the encoder as output filename.
Only for description:
I have a program that calls my script and says encode this file (e.g C:\DOKUME~1\Jan\LOKALE~1\Temp\X79f152b0-02e4-4a38-828b-a78fefde431a.avi ) to this file (e.g. C:\DOKUME~1\Jan\LOKALE~1\Temp\vdXdd79ddf12b0de43vd1avd.mpv ).
As you can see, the output file does not exist before calling the encoder.
I thought it would somehow be possible to get the long directory name, as the directories already exist. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Sun May 15, 2005 2:25 pm Post subject: |
|
|
| Rumbah wrote: | | I thought it would somehow be possible to get the long directory name, as the directories already exist. | You can, but just be sure to include 1 as the next parameter so that directories are returned. For example, the following would resolve the long path of the Program Files folder if it's on the C drive (assuming the short name is accurate): | Code: | Loop, C:\Progra~1, 1
MsgBox %A_LoopFileLongPath% |
|
|
| Back to top |
|
 |
|