473,569 Members | 2,652 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Store GUID as file/folder property

Is there any way to store a GUID value as a property on a file/folder?

When my app creates new files/folders, I'd like to store a GUID as a
custom property on the file/folder. This way, when the user physically
moves the file/folder using Windows Explorer (and not using my app), I
can use this GUID to detect which files/folders were moved and my app
can internally re-map some things.

Any thoughts?

Jul 21 '05 #1
1 1928
Do you have NTFS? IF yes, NTFS supports alternative datastreams (ADS) which
means that you can attach metadata to any file on your system.
The only problem is that it does not work under FAT32.

Alternatively, provided that nobody changes the files unnotified from your
program you can use a hashtable which saves filesize and CRC value
(hashcode) of the files so you can later recognize the files even if they
were renamed. This only works if the files are not modified (exception from
within your program).

hope that helps.

"Bryan Lynn" <ly****@gmail.c om> schrieb im Newsbeitrag
news:11******** *************@c 13g2000cwb.goog legroups.com...
Is there any way to store a GUID value as a property on a file/folder?

When my app creates new files/folders, I'd like to store a GUID as a
custom property on the file/folder. This way, when the user physically
moves the file/folder using Windows Explorer (and not using my app), I
can use this GUID to detect which files/folders were moved and my app
can internally re-map some things.

Any thoughts?

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1111
by: Mark | last post by:
I'm trying to port the asp.net unleashed sample store from SQLServer to Access. I have it all do, execpt when I try and add something to the cart I geet this error: Exception Details: System.InvalidOperationException: OleDbCommand.Prepare method requires all parameters to have an explicitly set type. Source Error: Line 37:
14
14245
by: Nak | last post by:
Hi there, Does anyone know how I would get the value of the assembly GUID in code from within the same application? Thanks in advance. Nick. -- /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ Slow internet connection?
1
5448
by: Brian Henry | last post by:
I need to mark assemblies with a unique id (GUID in this case) and retrieve it when the assembly is loaded into my application (a plug-in loader)... the plug-in assembly all have a class in it which implements our plug-in base class (which really is a default implementation of a interface IPlugin we created) The plug-in class looks like...
1
301
by: Bryan Lynn | last post by:
Is there any way to store a GUID value as a property on a file/folder? When my app creates new files/folders, I'd like to store a GUID as a custom property on the file/folder. This way, when the user physically moves the file/folder using Windows Explorer (and not using my app), I can use this GUID to detect which files/folders were moved...
1
4102
by: Wolf | last post by:
Hi I am trying to set a property(PartyHomeAddressID) = to a guid in a ini file. But everytime when the ini file has an empty guid it breaks with an error tellin me a guid is 32 char long with 4 dashes. client.PartyHomeAddressID = new Guid(contact.Substring(1542, 36).Trim());
11
10273
by: Tarren | last post by:
Hi: I need to get the unique GUID for a file, so I am using API calls through System.InteropServices I am using BY_HANDLE_FILE_INFORMATION and
10
4249
by: Paul Cheetham | last post by:
Hi, I am developing an application that needs to store some machine-specific settings. The application is going to be published on the network in order to keep the clients on the latest version. Because of this, I am unable to store these settings in the App.Config file, as this gets updated every time the application does, and there...
6
2422
by: martin1 | last post by:
Hi, All, The app retrieve sound.wav file from my loacal C drive, is there anyway the sound file can be stored in the app? then when building, it goes with app rather than sending sound file seperate with app when deploying the app. Thanks
2
16166
by: Troll | last post by:
Windows XP Pro VS 2005 & C# (I'm fairly new to C# but have doing VB.Net going on 2yrs and VB6 for 5yrs.) I'm using C# to build a custom RSS generator. I'm having trouble building the guid element for each item node in my feed. Some items do not have the "link" node because the description element is the content. So using the "link" as the...
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7974
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.