file-attributes

How to read file attributes using Master File Table data

走远了吗. 提交于 2019-12-13 05:57:25
问题 In my project i want list out all files under a specific file path.Do to some user permission issue am using master file table to access all files. Using this thread I can able to read all files under a specific file location This one will list the file name and parent FRN,is there any way to list the file attributes also???? I want to show these details also. Created Date Modified Data File Size USN_RECORD contains these details. 回答1: You'd probably be better off using something more high

An XML language for describing file attributes of a directory tree?

邮差的信 提交于 2019-12-11 02:33:06
问题 I have an application in mind which will record directory listings of a file system in text form. That is, it should say something like: File name is: abc.txt Last modification date is: 2009-12-31T01:23 Read-only attribute is: True Hidden attribute is: False The listings will persist for years in a long-term archive, so the language should be self-evident to an information archaeologist of the future. The language should be able to describe the most commonly-used file attributes of common PC

How Do I Programmatically Set a File Tag

こ雲淡風輕ζ 提交于 2019-12-10 19:12:16
问题 When using Windows Explorer to view files, I'm given the option to set a "tag", "category", or other attributes. For a JPEG a different set of attributes (including "tag") are options. I'd like to be able to set these programmatically. How do I programmatically set a file tag and other file attributes using Delphi (I have Delphi 2010 Pro)? 回答1: Tags in JPEG files are stored as IPTC keywords. There are a few libraries available for reading and writing those, if that's what you're asking for.

Best way to make a file writeable in c#

送分小仙女□ 提交于 2019-12-09 07:30:29
问题 I'm trying to set flag that causes the Read Only check box to appear when you right click \ Properties on a file. Thanks! 回答1: Two ways: System.IO.FileInfo fileInfo = new System.IO.FileInfo(filePath); fileInfo.IsReadOnly = true/false; or // Careful! This will clear other file flags e.g. FileAttributes.Hidden File.SetAttributes(filePath, FileAttributes.ReadOnly/FileAttributes.Normal); The IsReadOnly property on FileInfo essentially does the bit-flipping you would have to do manually in the

Extract Assembly Version from DLL using Python

孤街浪徒 提交于 2019-12-07 15:37:32
问题 I'm trying to extract some version information from a DLL using python. I read this question: Python windows File Version attribute It was helpful, but I also need to get the 'Assembly version' from the DLL. It's there when I right click and look on the versions tab, but not sure how I extract this with python. On this page: http://timgolden.me.uk/python/win32_how_do_i/get_dll_version.html Tim Golden says: You can use the slightly more messy language-dependent code in the demos which come

Getting specific file attributes

旧时模样 提交于 2019-12-04 09:32:40
问题 I've got a simple WCF service that lets clients/consumers upload image, audio or video files to it. After the upload, the service is supposed to analyze the file and somehow retrieve the following attributes: Image: width, height, date taken, program used Audio: runtime, artist, album, genre, bitrate, publication year Video: runtime, width, height, frames/sec, video bitrate, audio bitrate Apparently Windows can get and display these attributes pretty easily, but how do I do it in C#? 回答1:

Msys shell command to change the attributes of a file

烂漫一生 提交于 2019-12-04 03:35:15
问题 Please let me know a MSYS shell command that can be used for changing the attributes of a file. When I ran a command as ls -l I got the following : -rw-r--r-- 1 lenovo Admin .....m4sugar.m4 I want to provide full access rights. Any help is highly appreciated. Thanks 回答1: @cdhowie is right; this is a bug of msys tracked there -> http://sourceforge.net/tracker/?func=detail&atid=102435&aid=3071537&group_id=2435 It cannot do anything more useful than it already does, unless it fakes it in the

Get File Creation Date Over HTTP

限于喜欢 提交于 2019-12-04 00:28:05
问题 Given a file on a webserver (e.g., http://foo.com/bar.zip -> only accessible through HTTP), is there any way to get the date attributes (e.g., date [created, modified]) without downloading the entire archive in the first place? Right now, I download the archive and read the attributes programmatically. Trouble is that the archive is dozens of MiB so it seems like a waste of resources to download the entire thing and end up reading off just a couple of bytes of information. I realize that

Keeping file attributes on a copy

拥有回忆 提交于 2019-12-03 18:01:31
问题 I have the situation whereby I want to keep the original attributes on a file (the file creation date etc). Normally when you copy files in Windows, the copy that you make gets new 'modified' dates etc. I have come accross the shutil.copy command — although this doesn't keep the file attributes the same. I found the following question on Stack Unix, but I was wondering if there was a way for me to do this in Python. 回答1: If you look at the documentation for shutil , you'll immediately find

Best way to make a file writeable in c#

眉间皱痕 提交于 2019-12-03 10:23:25
I'm trying to set flag that causes the Read Only check box to appear when you right click \ Properties on a file. Thanks! Rex M Two ways: System.IO.FileInfo fileInfo = new System.IO.FileInfo(filePath); fileInfo.IsReadOnly = true/false; or // Careful! This will clear other file flags e.g. FileAttributes.Hidden File.SetAttributes(filePath, FileAttributes.ReadOnly/FileAttributes.Normal); The IsReadOnly property on FileInfo essentially does the bit-flipping you would have to do manually in the second method. To set the read-only flag, in effect making the file non-writeable: File.SetAttributes