<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Datei atribute]]></title><description><![CDATA[<p>Hab da ein kleines Problem:</p>
<p>Ich will die Dateiatribute mit C++ auslesen und ändern. Also ich habe eine Datei. Diese wurde zu einem bestimmten Zeitpunkt erstellt. Nun will ich diese Erstellungszeit auslesen und eine neue Datei erstellen die das gleiche erstellungsdatum hat. Wir kann man das ereichen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/17396/datei-atribute</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 09:22:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/17396.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 01 Jul 2002 13:39:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Datei atribute on Mon, 01 Jul 2002 13:39:00 GMT]]></title><description><![CDATA[<p>Hab da ein kleines Problem:</p>
<p>Ich will die Dateiatribute mit C++ auslesen und ändern. Also ich habe eine Datei. Diese wurde zu einem bestimmten Zeitpunkt erstellt. Nun will ich diese Erstellungszeit auslesen und eine neue Datei erstellen die das gleiche erstellungsdatum hat. Wir kann man das ereichen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/97306</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/97306</guid><dc:creator><![CDATA[syco]]></dc:creator><pubDate>Mon, 01 Jul 2002 13:39:00 GMT</pubDate></item><item><title><![CDATA[Reply to Datei atribute on Mon, 01 Jul 2002 15:38:00 GMT]]></title><description><![CDATA[<p>Hmm, da wirst du ohne WinAPI nicht auskommen.</p>
<p>Verschoben nach WinAPI.</p>
<p>MfG SideWinder</p>
]]></description><link>https://www.c-plusplus.net/forum/post/97307</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/97307</guid><dc:creator><![CDATA[SideWinder]]></dc:creator><pubDate>Mon, 01 Jul 2002 15:38:00 GMT</pubDate></item><item><title><![CDATA[Reply to Datei atribute on Mon, 01 Jul 2002 16:33:00 GMT]]></title><description><![CDATA[<p>Die Funktion dafür lautet SetFileTime():</p>
<pre><code class="language-cpp">SetFileTime(
    hFile,  // Handle der Datei
    lpCreationTime, // Pointer auf FILETIME-Struktur, wann die Datei erstellt wurde
    NULL,   // in deinem Fall egal
    NULL);  // in deinem Fall egal
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/97308</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/97308</guid><dc:creator><![CDATA[macphistox2002]]></dc:creator><pubDate>Mon, 01 Jul 2002 16:33:00 GMT</pubDate></item><item><title><![CDATA[Reply to Datei atribute on Wed, 18 Jun 2003 08:07:00 GMT]]></title><description><![CDATA[<p>Und wie lese ich das Datum aus ???<br />
Und kann ich FILETIME-Strukturen irgendwie vergleichen?<br />
Möchte ein proggi erstellen das alle neuen Dateien (seit letztem einschalten) auf ein Netzlaufwerk kopiert ...<br />
Gruss SeCa</p>
]]></description><link>https://www.c-plusplus.net/forum/post/97309</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/97309</guid><dc:creator><![CDATA[SeCa]]></dc:creator><pubDate>Wed, 18 Jun 2003 08:07:00 GMT</pubDate></item><item><title><![CDATA[Reply to Datei atribute on Wed, 18 Jun 2003 08:15:00 GMT]]></title><description><![CDATA[<p>mit <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/win32_find_data_str.asp" rel="nofollow">WIN32_FIND_DATA</a>,<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceobjst/html/cereffindfirstfile.asp" rel="nofollow">FindFirstFile</a> und <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceobjst/html/cerefFindNextFile.asp" rel="nofollow">FindNextFile</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/97310</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/97310</guid><dc:creator><![CDATA[Honk]]></dc:creator><pubDate>Wed, 18 Jun 2003 08:15:00 GMT</pubDate></item><item><title><![CDATA[Reply to Datei atribute on Wed, 18 Jun 2003 08:56:00 GMT]]></title><description><![CDATA[<p>Hallo<br />
erstmal danke für die antwort .</p>
<p>Ich habe jetzt folgende funktion zusammengeschrieben:</p>
<pre><code class="language-cpp">#include &quot;stdafx.h&quot;
#include &lt;windows.h&gt;
#include &lt;stdio.h&gt;

int GetDateOfLastChange(char* FileName){
    LPWIN32_FIND_DATA FileEigenschaften;
    FindFirstFile(FileName,FileEigenschaften);
    FILETIME lastAccess = FileEigenschaften-&gt;ftLastWriteTime;
    LPSYSTEMTIME lastAccessSys;
    FileTimeToSystemTime(&amp;lastAccess, lastAccessSys);
        printf(&quot;%w&quot;,lastAccessSys-&gt;wYear);
    return 0;
}
</code></pre>
<p>und ich führe die funktion mit<br />
GetDatOfLastChange(&quot;D:\&quot;);<br />
aus.</p>
<p>Jetzt hat er aber in dieser Zeile:<br />
FILETIME lastAccess = FileEigenschaften-&gt;ftLastWriteTime;<br />
einen Runtime-Fehler.<br />
Wisst ihr was hier das problem ist?<br />
Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/97311</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/97311</guid><dc:creator><![CDATA[SeCa]]></dc:creator><pubDate>Wed, 18 Jun 2003 08:56:00 GMT</pubDate></item><item><title><![CDATA[Reply to Datei atribute on Wed, 18 Jun 2003 09:38:00 GMT]]></title><description><![CDATA[<p>Probiers mal so:</p>
<pre><code class="language-cpp">int GetDateOfLastChange(char* FileName)
{
    WIN32_FIND_DATA FileEigenschaften;
    HANDLE hFile = FindFirstFile(FileName, &amp;FileEigenschaften);
    FindClose(hFile);
    SYSTEMTIME lastAccessSys;
    FileTimeToSystemTime(&amp;FileEigenschaften.ftLastWriteTime, &amp;lastAccessSys);
    cout &lt;&lt; lastAccessSys.wYear;
    return 0;
}
</code></pre>
<p>Und ruf die Funktion mal mit &quot;D:\\datei.txt&quot; (z.B.) auf.</p>
<p>Edit: Könntest auch noch über die WIN3_FIND_DATA überprüfen, ob das Handle beispielsweise ein Verzeichnis ist.</p>
<p>[ Dieser Beitrag wurde am 18.06.2003 um 11:41 Uhr von <strong>Honk</strong> editiert. ]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/97312</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/97312</guid><dc:creator><![CDATA[Honk]]></dc:creator><pubDate>Wed, 18 Jun 2003 09:38:00 GMT</pubDate></item><item><title><![CDATA[Reply to Datei atribute on Tue, 08 Jul 2008 17:47:44 GMT]]></title><description><![CDATA[<p>Wie kann man mit C++ das Erstelldatum für Ordner unter Windows 95-98-ME nachträglich ändern ?<br />
Ab Windows NT gibt es ja eine Möglichkeit in der MSDN mit Create File, um das Handle für den Ordner zu erhalten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1543688</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1543688</guid><dc:creator><![CDATA[didi1]]></dc:creator><pubDate>Tue, 08 Jul 2008 17:47:44 GMT</pubDate></item></channel></rss>