command line help

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
User avatar
Roni
Posts: 114
Joined: Fri Sep 26, 2008 7:55 pm
Location: Montreal
Contact:

command line help

Post by Roni »

i've been using batch files with NESASM to make things easier for me. what would be really great is if i knew of a command which would enable me to create a file with the "Author" detail in it's properties already set to something. does such a command exist?
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

Which operating system has such "properties"? It's not Mac OS X; Macs generally call it "Get Info" and not "Properties". Is it Windows Vista, Windows XP, or something else?
User avatar
Roni
Posts: 114
Joined: Fri Sep 26, 2008 7:55 pm
Location: Montreal
Contact:

Post by Roni »

i mean Windows file properties
like where it says "date modified" , "author", "track number", etc.
i believe it might be called "metadata"
i might be wrong, though

it would greatly assist in sorting ROMs that i wrote from all the other ROMs in the same folder
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

Roni wrote:i mean Windows file properties
like where it says "date modified" , "author", "track number", etc.
i believe it might be called "metadata"
i might be wrong, though
Oh, those. As far as I can tell, the "summary" tab of Windows XP's file properties window is stored in an NTFS alternate data stream. These won't get preserved when you send the file through the Internet or put it on a FAT-formatted drive such as a USB or SD memory card.

On my hard disk, roms I wrote are in E:\nesdev\%projectname%, and other roms are in E:\games\nes.
User avatar
Roni
Posts: 114
Joined: Fri Sep 26, 2008 7:55 pm
Location: Montreal
Contact:

Post by Roni »

so when i compile my asm source code using NESASM, there's no way to crank the NES file out with metadata already attatched to it?
User avatar
SecretServiceDude
Posts: 99
Joined: Wed Oct 22, 2008 3:49 pm
Location: Los Angeles, CA

Post by SecretServiceDude »

Have you taken a look at the Win32 function SetFileTime()?

Code: Select all

http://msdn.microsoft.com/en-us/library/ms724933(VS.85).aspx
Sorry for not including a direct link, but the parentheses in the URL mess up the [url] tags.

Anyhow, you could write a simple Win32 console application that uses SetFileTime() to adjust the "date modified" field, then call that application from your batch file.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

You'd have to write a Win32 console program that manipulates
the alternate data stream \005SummaryInformation through some COM interface.
User avatar
SecretServiceDude
Posts: 99
Joined: Wed Oct 22, 2008 3:49 pm
Location: Los Angeles, CA

Post by SecretServiceDude »

tepples wrote:You'd have to write a Win32 console program that manipulates
the alternate data stream \005SummaryInformation through some COM interface.
You clever devil, using "%28" and "%29" to encode the parentheses in the URL so that the [url] tags work properly. I was going to ask how you did that, but hitting the quote button on your post revealed your wizardry.
Post Reply