Jump to content

Tag a file in order to make it recognizable?


tip
 Share

Recommended Posts

Hi to all,

I'm willing to mark an archive file (7z to be precise) in a special way so that my application can recognize it and say "Yes I created this file." or "Sorry Dude..." :P

How can I do something like this? And if you have better ideas other than marking please share them too. I just want my application to recognize files it created...

Thanks in advance

Regards

Tip

[center]MsgBox_Tipped: Eye candy msgboxes/inputboxes/loginboxes. | CreateBlankBox: Semi-transparent layers with borders and rounded corners.[/center]

Link to comment
Share on other sites

Thank for your advise but I need to do it only using autoit script/exe file... Resource Hacker or other third party tools will not help me with this...

The process goes like this: My autoit script creates a 7z archive from a folder and I need to label the archive file somehow so that my autoit script will recognize the files it created and separates them with user/system/etc-created files ...

Edited by tip

[center]MsgBox_Tipped: Eye candy msgboxes/inputboxes/loginboxes. | CreateBlankBox: Semi-transparent layers with borders and rounded corners.[/center]

Link to comment
Share on other sites

Thank for your advise but I need to do it only using autoit script/exe file... Resource Hacker or other third party tools will not help me with this...

The process goes like this: My autoit script creates a 7z archive from a folder and I need to label the archive file somehow so that my autoit script will recognize the files it created and separates them with user/system/etc-created files ...

Why not create a tag file that gets included when the 7z archive is created and then have your script do a list of the 7z contents and if the tag file is found, you know the archive was created by your script.

Or, just create the archive with a double extension or unique name: ie: instead of "archive.7z" call it "archive.myfile.7z"

Heck of a lot easier than trying to modify an archive's structure.

Link to comment
Share on other sites

Why not create a tag file that gets included when the 7z archive is created and then have your script do a list of the 7z contents and if the tag file is found, you know the archive was created by your script.

Or, just create the archive with a double extension or unique name: ie: instead of "archive.7z" call it "archive.myfile.7z"

Heck of a lot easier than trying to modify an archive's structure.

Because those can be done by user too. Anyone can change the file name or contents of an archive. And I just don't want that... But thanks...

Any other Ideas...

Edited by tip

[center]MsgBox_Tipped: Eye candy msgboxes/inputboxes/loginboxes. | CreateBlankBox: Semi-transparent layers with borders and rounded corners.[/center]

Link to comment
Share on other sites

Try this for an oldschool example,

Create a sample Tag header file say with the contents::

TipZip_Generated:

Save this as TIP.tag and create a test 7z archive in the same directory.

Open up a cmd prompt in that directory and type::

COPY /B TIP.tag+Test.7z TipZipGen.7z

This should have concatenated your tagfile with the archive.

Whatever data you put in the Tag file should represent the data that

your app reads to recognise this file as being generated by your program.

Remember this is just an example, far better to have Au3 generate such a file

on the fly allowing the information to vary slightly if you wish. AutoIt also

could do all the concatenation procedures internally, its up to you.

No warranty on this working for you. I would not recommend Modding the actual

7z header unless you know what you are doing.

That's great thank you... But if you don't mind I have few questions.

1) First of all How can I read from tip.tag file when I use copy /B method?

2)How does copy /B command works exactly? I mean I've been using it for a while to create 7z sfx files but I really don't how it combine files...

3) I work with 1-3 gb archive files and with copy /B command it takes sometime to complete task. Is there another/faster way to mark my archive files???

Thanks again

Regards

Tip

[center]MsgBox_Tipped: Eye candy msgboxes/inputboxes/loginboxes. | CreateBlankBox: Semi-transparent layers with borders and rounded corners.[/center]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...