<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Получение полного пути файла из сокращенного (MS DOS).]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13820&amp;type=atom" />
	<updated>2018-06-05T14:58:51Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13820</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение полного пути файла из сокращенного (MS DOS).]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125829#p125829" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Проблема прекрасно решилась с помощью найденной функции. Использование её выглядит более аккуратным, и можно обойтись без цикла (A_LoopFileLongPath). Но способ достать длинные имена возьму в копилку. Об этом как то даже не думал, поскольку цикл в моем случае не используется. Код с циклом был приведен для примера отображения имен в dos формате.</p>]]></content>
			<author>
				<name><![CDATA[Molotok]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39027</uri>
			</author>
			<updated>2018-06-05T14:58:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125829#p125829</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение полного пути файла из сокращенного (MS DOS).]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125828#p125828" />
			<content type="html"><![CDATA[<p>А, верно, A_LoopFileLongPath нужен.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-06-05T14:53:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125828#p125828</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение полного пути файла из сокращенного (MS DOS).]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125827#p125827" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Всё проще:</p></blockquote></div><p>А почему ты используешь A_LoopFilePath, а не A_LoopFileLongPath?<br /></p><div class="codebox"><pre><code>temp := &quot;C:\PROGRA~1\test&quot;
Loop, files, %temp%, D
   MsgBox, % A_LoopFilePath &quot;`n&quot; A_LoopFileLongPath</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-06-05T14:33:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125827#p125827</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение полного пути файла из сокращенного (MS DOS).]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125826#p125826" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Molotok пишет:</cite><blockquote><p><strong>teadrinker</strong><br />Эта проблема возникает в случае, если имя пользователя (windows) длиннее 8 символов.<br />Этим кодом кожно наглядно проверить.<br /></p><div class="codebox"><pre><code>Loop, %A_Temp%\*.*, 0, 0
{
w1 = %A_LoopFileFullPath%
MsgBox, %w1%
}
f12::
    ExitApp
    return
</code></pre></div></blockquote></div><p>В смысле, у вас этот код не возвращает имена файлов? А такой:<br /></p><div class="codebox"><pre><code>Loop, Files, %A_Temp%\*.*
   MsgBox, % A_LoopFilePath
Return

F12:: ExitApp</code></pre></div><p>?<br /></p><div class="quotebox"><blockquote><p>Нашёл код преобразующий короткое имя в длинное</p></blockquote></div><p>Всё проще:<br /></p><div class="codebox"><pre><code>Loop, files, %A_Temp%, D
   MsgBox, % A_LoopFilePath</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-06-05T14:14:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125826#p125826</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение полного пути файла из сокращенного (MS DOS).]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125825#p125825" />
			<content type="html"><![CDATA[<p>Всё отлично работает!<br /></p><div class="codebox"><pre><code>b_temp := GetLongPathName(A_Temp)

Loop, %b_temp%\*.*, 0, 0
{
w1 = %A_LoopFileFullPath%
MsgBox, %w1%
}

f12::
    ExitApp
    return
GetLongPathName(path)
{
  VarSetCapacity(out, 522)
  DllCall(&quot;GetLongPathName&quot;, &quot;str&quot;, path, &quot;str&quot;, out, &quot;uint&quot;, 260)
  return out
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Molotok]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39027</uri>
			</author>
			<updated>2018-06-05T13:52:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125825#p125825</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение полного пути файла из сокращенного (MS DOS).]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125824#p125824" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Эта проблема возникает в случае, если имя пользователя (windows) длиннее 8 символов.<br />Этим кодом кожно наглядно проверить.<br /></p><div class="codebox"><pre><code>Loop, %A_Temp%\*.*, 0, 0
{
w1 = %A_LoopFileFullPath%
MsgBox, %w1%
}
f12::
    ExitApp
    return
</code></pre></div><p><strong>Malcev</strong><br />Спасибо. Нашёл <a href="https://autohotkey.com/board/topic/123205-a-scriptdir-and-a-temp-not-equal/">код</a> преобразующий короткое имя в длинное.<br /></p><div class="codebox"><pre><code>
GetLongPathName(path)
{
  VarSetCapacity(out, 522)
  DllCall(&quot;GetLongPathName&quot;, &quot;str&quot;, path, &quot;str&quot;, out, &quot;uint&quot;, 260)
  return out
}</code></pre></div><p>Как проверю - сообщу результат.</p>]]></content>
			<author>
				<name><![CDATA[Molotok]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39027</uri>
			</author>
			<updated>2018-06-05T13:47:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125824#p125824</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение полного пути файла из сокращенного (MS DOS).]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125823#p125823" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Molotok пишет:</cite><blockquote><p>При подстановке переменной A_Temp в команды FileDelete и FileRemoveDir удаления не происходит.</p></blockquote></div><p>Никогда о такой проблеме не слышал. Покажите, что именно и как подставляете.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-06-05T13:23:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125823#p125823</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получение полного пути файла из сокращенного (MS DOS).]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125822#p125822" />
			<content type="html"><![CDATA[<p>GetLongPathName.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-06-05T13:22:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125822#p125822</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Получение полного пути файла из сокращенного (MS DOS).]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125821#p125821" />
			<content type="html"><![CDATA[<p>Добрый день.</p><p>При подстановке переменной A_Temp в команды FileDelete и FileRemoveDir удаления не происходит.<br />Переменная A_Temp содержит сокращённый до 8 символов путь (стандарт DOS). Если путь указывать целиком, не прибегая к A_Temp - то FileDelete работает.</p><p>Как получить полный путь (не формата DOS) из переменной A_temp?</p>]]></content>
			<author>
				<name><![CDATA[Molotok]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39027</uri>
			</author>
			<updated>2018-06-05T13:12:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125821#p125821</id>
		</entry>
</feed>
