473,394 Members | 1,787 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to Identify a unique file

Hello.
I'm working on new project. It is a Movies/Series Organizer. The user has any amount of movies, series and covers files in any folders. So I need some how to identify any file from another. I would like to be able to put some ID code inside the file (like in attribute or so), in order to recognize that "unique" file.

I came with the idea of put a code at the end of the file name (ex. "Star Wars Episode IV.#&33.avi") but I'm not glad with it.

Someone has a better idea?
May 21 '13 #1
4 1265
Rabbit
12,516 Expert Mod 8TB
You could store it in the extended file properties.
May 21 '13 #2
Thanks Rabbit, but you have any idea on how it could be done? (shell32 or so?)
May 22 '13 #3
Rabbit
12,516 Expert Mod 8TB
I've only read the extended file properties and you can do that with the Folder object's GetDetailsOf method. Here is a link to Microsoft's documentation on that.
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx.

I'm sure if you poke around the manual you'll find the function that lets you set it. I don't know it off the top of my head because I've never used it. But it reasons to stand that if you can get them, you can also set them.
May 22 '13 #4
Finding information on the web I got the DSOFile assembly. It allows me to read and write extended file properties such as Comments, Category, Author, etc.
What I do is to put an ID inside on one of this properties, and the same time this ID is the "Key" of a Hashtable Collection where I save all the information about that file.
This assembly allows me to work with files even when these files are being used by another app.
Anyway, I gonna look over about GetDetailsOf method you mencioned.
May 23 '13 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: LELAND PRINCE | last post by:
Thanks, this group has been a big help. I need to create a backup copy of a working file that changes everyday, but I need to maintain a copy from each day. Would like to create: back1.txt...
3
by: CJA | last post by:
Hi I have a script that will compact an Access MDB and a copy to a new folder. I would it to give each export a unique file name. I can do this with an absolute file reference but I am...
39
by: Dave Theese | last post by:
Hello all, We're presented with the problem of needing to generate a unique file name. I've had some thoughts, but also wanted to solicit suggestions from the group. Any suggestions for...
9
by: LarryR | last post by:
The following XSLT works fine using MSXML 4.0 (e.g I receive a result in about 20 seconds), but effectively hangs in both .NET 1.0 sp2 with the XML hot fix and NET 1.1. My source XML file is...
3
by: Manuel | last post by:
I've playing around with multi-threading applications lately. The main problem I have is that when I create a file/table/whatever I need a unique name. The only way I could come up with, is asking...
2
by: Shilpa | last post by:
Hi All, I want to write C# code to identify a file type and open the file in the associated editor. For example, text files should be identified and opened in notepad, html should be opened in...
3
by: Shilpa | last post by:
Hi All, I want to write C# code to identify a file type and open the file in the associated editor. For example, text files should be identified and opened in notepad, html should be opened in...
5
by: EP | last post by:
This inquiry may either turn out to be about the suitability of the SHA-1 (160 bit digest) for file identification, the sha function in Python ... or about some error in my script. Any insight...
1
by: Daniel Mark | last post by:
Hello all: I have following code that works well under command line, but it doesn't work after I convert it as exe application. ############### file: testPath.py import getopt, math, sys,...
2
by: h112211 | last post by:
Hi, I installed the newest available PIL (1.1.5 for Python 2.4) from their site, but cannot seem to open any files. The following from PIL import Image i =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.