AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A_LoopFileLongPath does not work if the file does not exist

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Rumbah



Joined: 30 Mar 2005
Posts: 10

PostPosted: Sun May 15, 2005 12:31 am    Post subject: A_LoopFileLongPath does not work if the file does not exist Reply with quote

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
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Sun May 15, 2005 1:57 am    Post subject: Re: A_LoopFileLongPath does not work if the file does not ex Reply with quote

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
View user's profile Send private message Send e-mail
Rumbah



Joined: 30 Mar 2005
Posts: 10

PostPosted: Sun May 15, 2005 2:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Sun May 15, 2005 2:25 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group