<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Вывод короткого (DOS: 8.3) имени определённого файла]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=12409&amp;type=atom" />
	<updated>2017-02-07T00:34:22Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12409</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод короткого (DOS: 8.3) имени определённого файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111961#p111961" />
			<content type="html"><![CDATA[<p><strong>DD</strong><br />Если речь о полном пути, то берётся ShortPath вместо ShortName. Для перебора папок - SubFolders вместо Files.<br />Можно возвращать и по-отдельности:<br /></p><div class="codebox"><pre><code>MyFile = C:\Program Files\Windows Media Player\wmplayer.exe
MsgBox, % ComObjCreate(&quot;Scripting.FileSystemObject&quot;).GetFile(MyFile).ShortName
MsgBox, % ComObjCreate(&quot;Scripting.FileSystemObject&quot;).GetFile(MyFile).ShortPath

Folder = C:\Program Files\Windows Media Player\
MsgBox, % ComObjCreate(&quot;Scripting.FileSystemObject&quot;).GetFolder(Folder).ShortName
MsgBox, % ComObjCreate(&quot;Scripting.FileSystemObject&quot;).GetFolder(Folder).ShortPath</code></pre></div><p>Заголовок чуток уточнил, т.к. под короткими иногда разное понимают.</p>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2017-02-07T00:34:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111961#p111961</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод короткого (DOS: 8.3) имени определённого файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111958#p111958" />
			<content type="html"><![CDATA[<p>Всё-таки, наряду с &quot;короткими&quot; их и &quot;сокращёнными&quot; называют — это я в названии темы для поисковиков писал.</p>]]></content>
			<author>
				<name><![CDATA[DD]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25263</uri>
			</author>
			<updated>2017-02-07T00:26:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111958#p111958</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод короткого (DOS: 8.3) имени определённого файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111957#p111957" />
			<content type="html"><![CDATA[<p><strong>Flasher</strong>, а возможна настройка, чтобы код возвращал и папки?<br /></p><div class="codebox"><pre><code>For F in ComObjCreate(&quot;Scripting.FileSystemObject&quot;).GetFolder(&quot;C:\Test&quot;).Files
   MsgBox, % F.ShortName</code></pre></div>]]></content>
			<author>
				<name><![CDATA[DD]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25263</uri>
			</author>
			<updated>2017-02-07T00:21:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111957#p111957</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод короткого (DOS: 8.3) имени определённого файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111956#p111956" />
			<content type="html"><![CDATA[<p>Да, короткое надо было получать из длинного, спасибо.</p><div class="codebox"><pre><code>MyFile = C:\Program Files\AutoHotkey\AutoHotkey.exe
Loop, %MyFile%, 1
{
  Long := A_LoopFileLongPath
  Short := A_LoopFileShortPath
}
MsgBox %Long%`n%Short%
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[DD]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25263</uri>
			</author>
			<updated>2017-02-07T00:14:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111956#p111956</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вывод короткого (DOS: 8.3) имени определённого файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111954#p111954" />
			<content type="html"><![CDATA[<p>Короткое - это DOS что-ли? Так shrt_nms.txt = 8.3. Из чего его получать? О чём речь?<br />Если о переборе списка/коллекции, см. <a href="http://www.script-coding.com/AutoHotkey/LoopFilesFolders.html">A_LoopFileShortPath/A_LoopFileShortName</a>.<br />Ежели в реестре стоит заглушка NtfsDisable8dot3NameCreation, то можно так:<br /></p><div class="codebox"><pre><code>For F in ComObjCreate(&quot;Scripting.FileSystemObject&quot;).GetFolder(&quot;C:\Test&quot;).Files
   MsgBox, % F.ShortName</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2017-02-06T23:15:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111954#p111954</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Вывод короткого (DOS: 8.3) имени определённого файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111953#p111953" />
			<content type="html"><![CDATA[<p>Есть ли команда, позволяющая получить короткое имя файла на лету, а не как ниже?</p><div class="codebox"><pre><code>
  obj = Этот:\каталог
  RunWait, %comspec% /c &quot;dir &quot;%obj%\&quot; /x &gt; &quot;%A_TEMP%\shrt_nms.txt&quot;&quot;,, UseErrorLevel
  Run, &quot;%A_TEMP%\shrt_nms.txt&quot;
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[DD]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25263</uri>
			</author>
			<updated>2017-02-06T23:09:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111953#p111953</id>
		</entry>
</feed>
