<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>X-pack.org &#187; Files</title>
	<atom:link href="http://home.x-pack.org/category/free-source-code/delphi/files/feed/" rel="self" type="application/rss+xml" />
	<link>http://home.x-pack.org</link>
	<description>Download all you need here</description>
	<lastBuildDate>Fri, 18 May 2012 11:09:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>[ Delphi ] – Delete all files within directory</title>
		<link>http://home.x-pack.org/delphi-delete-all-files-within-directory/</link>
		<comments>http://home.x-pack.org/delphi-delete-all-files-within-directory/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 03:45:00 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Files]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=454</guid>
		<description><![CDATA[{You have to FileListBox component on the form} procedure TForm1.Button1Click(Sender: TObject); var &#160;&#160;i: Integer; begin &#160;&#160;for i:=0 to FileListBox1.Items.Count-1 do &#160;&#160;&#160;&#160;DeleteFile(FileListBox1.Items[i]); &#160;&#160;FileListBox1.Update; end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-delete-all-files-within-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Find out total size of directory</title>
		<link>http://home.x-pack.org/delphi-find-out-total-size-of-directory/</link>
		<comments>http://home.x-pack.org/delphi-find-out-total-size-of-directory/#comments</comments>
		<pubDate>Tue, 04 May 2010 04:10:54 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Files]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=479</guid>
		<description><![CDATA[procedure TForm1.Find(Str: string); var &#160;&#160;MySearch: TSearchRec; &#160;&#160;FindResult: Integer; begin &#160;&#160;FindResult:=FindFirst(Str+'\*.*', &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;faArchive+faHidden+ &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;faAnyFile+faVolumeID+ &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;faSysFile+faReadOnly+faDirectory, &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;MySearch); &#160;&#160;while FindResult=0 do &#160;&#160;begin &#160;&#160;&#160;&#160;if (MySearch.Attr=faDirectory) and &#160;&#160;&#160;&#160;&#160;&#160; (MySearch.Name'.') and &#160;&#160;&#160;&#160;&#160;&#160; (MySearch.Name'..') then &#160;&#160;&#160;&#160;&#160;&#160;Find(Str+'\'+MySearch.Name) &#160;&#160;&#160;&#160;else &#160;&#160;&#160;&#160;&#160;&#160;TotalSize:=TotalSize+MySearch.Size; &#160;&#160;&#160;&#160;FindResult:=FindNext(MySearch); &#160;&#160;end; &#160;&#160;FindClose(MySearch); end; procedure TForm1.Button1Click(Sender: TObject); begin &#160;&#160;TotalSize:=0; &#160;&#160;if Length(Edit1.Text)&#038;gt0 then &#160;&#160;begin &#160;&#160;&#160;&#160;Find(Edit1.Text); &#160;&#160;&#160;&#160;Label2.Caption:='Total size = '+IntToStr(TotalSize); &#160;&#160;end; end; procedure TForm1.Button2Click(Sender: TObject); var &#160;&#160;St:]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-find-out-total-size-of-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Show the select directory dialog</title>
		<link>http://home.x-pack.org/delphi-show-the-select-directory-dialog/</link>
		<comments>http://home.x-pack.org/delphi-show-the-select-directory-dialog/#comments</comments>
		<pubDate>Tue, 04 May 2010 04:05:52 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Files]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=473</guid>
		<description><![CDATA[uses Filectrl; procedure TForm1.Button1Click(Sender: TObject); var &#160;&#160;Dir: String; begin &#160;&#160;SelectDirectory('Select a directory', '', Dir); &#160;&#160;ShowMessage(Dir); end; //Dir is the selected directory]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-show-the-select-directory-dialog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Convert long filenames in short filenames</title>
		<link>http://home.x-pack.org/delphi-convert-long-filenames-in-short-filenames/</link>
		<comments>http://home.x-pack.org/delphi-convert-long-filenames-in-short-filenames/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 04:07:33 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Files]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=475</guid>
		<description><![CDATA[{ Usage: GetShortName('C:\Program Files\test.txt'); which returns "C:\PROGRA~1\test.txt" } uses &#160;&#160;Windows, SysUtils; function GetShortName(sLongName: string): string; var &#160;&#160;sShortName:&#160;&#160;&#160;&#160;string; &#160;&#160;nShortNameLen: Integer; begin &#160;&#160;SetLength(sShortName, MAX_PATH); &#160;&#160;nShortNameLen := GetShortPathName(PChar(sLongName), PChar(sShortName), MAX_PATH - 1); &#160;&#160;if (0 = nShortNameLen) then &#160;&#160;begin &#160;&#160;showmessage('Error!'); &#160;&#160;end; &#160;&#160;SetLength(sShortName, nShortNameLen); &#160;&#160;Result := sShortName; end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-convert-long-filenames-in-short-filenames/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Check if a path exists</title>
		<link>http://home.x-pack.org/delphi-check-if-a-path-exists/</link>
		<comments>http://home.x-pack.org/delphi-check-if-a-path-exists/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 04:03:52 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Files]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=471</guid>
		<description><![CDATA[uses FileCtrl; procedure TForm1.Button1Click(Sender: TObject); begin &#160;&#160;if DirectoryExists('c:\test') then &#160;&#160;&#160;&#160;ShowMessage('Path exists!') &#160;&#160;&#160;&#160;else &#160;&#160;&#160;&#160;ShowMessage('There is no such path!'); end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-check-if-a-path-exists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Get the last access from a file</title>
		<link>http://home.x-pack.org/delphi-get-the-last-access-from-a-file/</link>
		<comments>http://home.x-pack.org/delphi-get-the-last-access-from-a-file/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 03:59:17 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Files]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=466</guid>
		<description><![CDATA[function GetLastAccessTime(sFileName: string): TDateTime; var &#160;&#160;ffd: TWin32FindData; &#160;&#160;dft: DWORD; &#160;&#160;lft: TFileTime; &#160;&#160;h:&#160;&#160; THandle; begin &#160;&#160;h := Windows.FindFirstFile(PChar(sFileName), ffd); &#160;&#160;if (INVALID_HANDLE_VALUE &#60;&#62; h) then &#160;&#160;begin &#160;&#160;&#160;&#160;Windows.FindClose(h); &#160;&#160;&#160;&#160;FileTimeToLocalFileTime(ffd.ftLastAccessTime, lft); &#160;&#160;&#160;&#160;FileTimeToDosDateTime(lft, LongRec(dft).Hi, LongRec(dft).Lo); &#160;&#160;&#160;&#160;Result := FileDateToDateTime(dft); &#160;&#160;end; end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-get-the-last-access-from-a-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Add a file to the document menu</title>
		<link>http://home.x-pack.org/delphi-add-a-file-to-the-document-menu/</link>
		<comments>http://home.x-pack.org/delphi-add-a-file-to-the-document-menu/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 03:54:20 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Files]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=464</guid>
		<description><![CDATA[uses ShellAPI, ShlOBJ; procedure AddToStartDocumentsMenu(sFilePath: string); begin SHAddToRecentDocs(SHARD_PATH, PChar(sFilePath)); end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-add-a-file-to-the-document-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Shred and Delete files without any trace</title>
		<link>http://home.x-pack.org/delphi-shred-and-delete-files-without-any-trace/</link>
		<comments>http://home.x-pack.org/delphi-shred-and-delete-files-without-any-trace/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 03:48:11 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Files]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=458</guid>
		<description><![CDATA[procedure ShredderFile(FileName: string); const &#160;&#160;Buffer&#160;&#160;&#160;&#160;&#160;&#160; = 1024; &#160;&#160;Counttowrite = 34; &#160;&#160;FillBuffer: array[0..5] of Integer = ($00, $FF, $00, $F0, $0F, $00); var &#160;&#160;arr: array[1..Buffer] of Byte; &#160;&#160;f: file; &#160;&#160;i, j, n: Integer; begin &#160;&#160;AssignFile(f, FileName); &#160;&#160;Reset(f, 1); &#160;&#160;n := FileSize(f); &#160;&#160;for j := 0 to Counttowrite do &#160;&#160;begin &#160;&#160;&#160;&#160;for i := 1 to n div]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-shred-and-delete-files-without-any-trace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Set or change file attributes</title>
		<link>http://home.x-pack.org/delphi-set-or-change-file-attributes/</link>
		<comments>http://home.x-pack.org/delphi-set-or-change-file-attributes/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 03:46:20 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Files]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=456</guid>
		<description><![CDATA[procedure TForm1.Button1Click(Sender: TObject); begin &#160;&#160;with OpenDialog1 do &#160;&#160;&#160;&#160;if Execute then &#160;&#160;&#160;&#160;&#160;&#160;if SetFileAttributes(PChar(Filename), FILE_ATTRIBUTE_HIDDEN) then &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Caption:='attribute was changed' &#160;&#160;&#160;&#160;&#160;&#160;else &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Caption:='attribute was not changed'; end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-set-or-change-file-attributes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Append one file to other</title>
		<link>http://home.x-pack.org/delphi-append-one-file-to-other/</link>
		<comments>http://home.x-pack.org/delphi-append-one-file-to-other/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 03:43:25 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Files]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=451</guid>
		<description><![CDATA[procedure TForm1.Button3Click(Sender: TObject); var &#160;&#160;Str: string; &#160;&#160;F1, F2, F3: TextFile; begin &#160;&#160;Label3.Caption:='Processing...'; &#160;&#160;AssignFile(F1, Edit1.Text); &#160;&#160;AssignFile(F2, Edit2.Text); &#160;&#160;AssignFile(F3, 'new.$'); &#160;&#160;Reset(F1); &#160;&#160;Reset(F2); &#160;&#160;Rewrite(F3); &#160;&#160;while not(EOF(F1)) do &#160;&#160;begin &#160;&#160;&#160;&#160;Readln(F1, Str); &#160;&#160;&#160;&#160;Writeln(F3, Str); &#160;&#160;end; &#160;&#160;while not(EOF(F2)) do &#160;&#160;begin &#160;&#160;&#160;&#160;Readln(F2, Str); &#160;&#160;&#160;&#160;Writeln(F3, Str); &#160;&#160;end; &#160;&#160;CloseFile(F1); &#160;&#160;CloseFile(F2); &#160;&#160;CloseFile(F3); &#160;&#160;DeleteFile(ExtractFileName(Edit1.Text)); &#160;&#160;RenameFile('new.$', ExtractFileName(Edit1.Text)); &#160;&#160;DeleteFile('new.$'); &#160;&#160;Label3.Caption:='Processing done'; end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-append-one-file-to-other/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Set date/time of the file</title>
		<link>http://home.x-pack.org/delphi-set-datetime-of-the-file/</link>
		<comments>http://home.x-pack.org/delphi-set-datetime-of-the-file/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 04:12:10 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Files]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=481</guid>
		<description><![CDATA[procedure TForm1.Button1Click(Sender: TObject); begin &#160;&#160;if OpenDialog1.Execute then &#160;&#160;&#160;&#160;Edit1.Text:=OpenDialog1.FileName; end; procedure TForm1.Button2Click(Sender: TObject); var &#160;&#160;HFile: Word; &#160;&#160;MyDate: TDateTime; &#160;&#160;MyDate2: Integer; begin &#160;&#160;HFile:=FileOpen(Edit1.Text, fmOpenWrite); &#160;&#160;MyDate:=StrToDateTime(Edit2.Text); &#160;&#160;MyDate2:=DateTimeToFileDate(MyDate); &#160;&#160;FileSetDate(HFile, MyDate2); &#160;&#160;FileClose(HFile); end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-set-datetime-of-the-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] –  Detect changings of a directory</title>
		<link>http://home.x-pack.org/delphi-detect-changings-of-a-directory/</link>
		<comments>http://home.x-pack.org/delphi-detect-changings-of-a-directory/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 04:08:33 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Files]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=477</guid>
		<description><![CDATA[procedure TForm1.Timer1Timer(Sender: TObject); var &#160;&#160;Dir: string; begin &#160;&#160;Dir:=Edit1.Text; &#160;&#160;if FindFirstChangeNotification( &#160;&#160;&#160;&#160;&#160;&#160; PChar(Dir), &#160;&#160;&#160;&#160;&#160;&#160; False, &#160;&#160;&#160;&#160;&#160;&#160; FILE_NOTIFY_CHANGE_DIR_NAME)]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-detect-changings-of-a-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Get the version of a file</title>
		<link>http://home.x-pack.org/delphi-get-the-version-of-a-file/</link>
		<comments>http://home.x-pack.org/delphi-get-the-version-of-a-file/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 03:53:23 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Files]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=462</guid>
		<description><![CDATA[function GetVersion(sFileName:string): string; var &#160;&#160;VerInfoSize: DWORD; &#160;&#160;VerInfo: Pointer; &#160;&#160;VerValueSize: DWORD; &#160;&#160;VerValue: PVSFixedFileInfo; &#160;&#160;Dummy: DWORD; begin &#160;&#160;VerInfoSize := GetFileVersionInfoSize(PChar(sFileName), Dummy); &#160;&#160;GetMem(VerInfo, VerInfoSize); &#160;&#160;GetFileVersionInfo(PChar(sFileName), 0, VerInfoSize, VerInfo); &#160;&#160;VerQueryValue(VerInfo, '\', Pointer(VerValue), VerValueSize); &#160;&#160;with VerValue^ do &#160;&#160;begin &#160;&#160;&#160;&#160;Result := IntToStr(dwFileVersionMS shr 16); &#160;&#160;&#160;&#160;Result := Result + '.' + IntToStr(dwFileVersionMS and $FFFF); &#160;&#160;&#160;&#160;Result := Result + '.' + IntToStr(dwFileVersionLS shr]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-get-the-version-of-a-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Move a file in the recycle bin</title>
		<link>http://home.x-pack.org/delphi-move-a-file-in-the-recycle-bin/</link>
		<comments>http://home.x-pack.org/delphi-move-a-file-in-the-recycle-bin/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 04:02:47 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Files]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=469</guid>
		<description><![CDATA[uses ShellAPI; function MoveToRecycle(sFileName: string): Boolean; var &#160;&#160;fos: TSHFileOpStruct; begin &#160;&#160;FillChar(fos, SizeOf(fos), 0); &#160;&#160;with fos do &#160;&#160;begin &#160;&#160;&#160;&#160;wFunc&#160;&#160;:= FO_DELETE; &#160;&#160;&#160;&#160;pFrom&#160;&#160;:= PChar(sFileName); &#160;&#160;&#160;&#160;fFlags := FOF_ALLOWUNDO or FOF_NOCONFIRMATION or FOF_SILENT; &#160;&#160;end; &#160;&#160;Result := (0 = ShFileOperation(fos)); end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-move-a-file-in-the-recycle-bin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Convert Short filenames to Long filenames</title>
		<link>http://home.x-pack.org/delphi-convert-short-filenames-to-long-filenames/</link>
		<comments>http://home.x-pack.org/delphi-convert-short-filenames-to-long-filenames/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 03:50:30 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Files]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=460</guid>
		<description><![CDATA[uses Shellapi; function GetLongFileName(const sFileName: string): string; var &#160;&#160;SHFileInfo: TSHFileInfo; begin &#160;&#160;if SHGetFileInfo(PChar(sFileName), &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0, &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; SHFileInfo, &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; SizeOf(SHFileInfo), &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; SHGFI_DISPLAYNAME) &#60;&#62; 0 then &#160;&#160;&#160;&#160;Result := string(SHFileInfo.szDisplayName) &#160;&#160;else &#160;&#160;&#160;&#160;Result := sFileName; end; procedure TForm1.Button1Click(Sender: TObject); begin &#160;&#160;Caption := GetLongFileName('C:\Program Files\test_l~1.txt'); end; //The result is test_longfilename.txt]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-convert-short-filenames-to-long-filenames/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 35/85 queries in 0.128 seconds using disk: basic
Object Caching 811/919 objects using disk: basic

Served from: home.x-pack.org @ 2012-05-19 04:59:59 -->
