Indigo Rose Software
  #1  
Old 11-28-2007
Autoplayit07 Autoplayit07 is offline
Forum Member
 
Join Date: Nov 2007
Posts: 15
retrieve information from a files properties

Hello.
is it possible to retrieve the information from a files properties,
the information I am reffering to is the information you see when you right clik a file and chose advance/simple or summary.
if if so , how is this done?
allso how to get ams to display this information in a paragraph box
thank you.

Last edited by Autoplayit07; 11-28-2007 at 10:33 AM.
Reply With Quote
  #2  
Old 11-28-2007
Dermot Dermot is offline
Indigo Rose Customer
 
Join Date: Apr 2004
Location: Vancouver, Canada
Posts: 1,520
Look up the File.GetAttributes action in the help file.
__________________
Dermot

AMS Add-ons - xDialog.com

A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.
Reply With Quote
  #3  
Old 11-28-2007
Autoplayit07 Autoplayit07 is offline
Forum Member
 
Join Date: Nov 2007
Posts: 15
hey thank you Dermot.
but i tried to retrieve the infotmation and put it into a text file like this
Code:
result = File.GetAttributes(_ProgramFilesFolder.."\\AutoPlay Media Studio 7.0\\ams70.exe")
TextFile.WriteFromString("C:\\MyFile.txt", ""..result, true);
but i get an error "attempt to index global result (a nil value)"
something like that.
my code looks to simple, am pretty sure i am missing somthing here.
Reply With Quote
  #4  
Old 11-28-2007
Dermot Dermot is offline
Indigo Rose Customer
 
Join Date: Apr 2004
Location: Vancouver, Canada
Posts: 1,520
If you read the help file topic, it clearly states that it returns a table of values. So you have to access the info return like this
CreationDate = result.CreationDate
ReadOnly = result.ReaOnly
and so on....

From the help file.
Quote:
Description
Returns a table containing all of the attributes for a specific file.

Parameters
Filename
(string) The path to the file.

Returns
(table) A table containing the file attributes indexed by name. If the file does not exist or an error occurs, this action returns nil.

If the file exists, the following attributes will be stored in the table:

KEY
TYPE
DESCRIPTION

CreationDate
string
The date the file was created (Monday, May 26, 2003).

CreationDateISO
string
The date the file was created, in ISO format (2003-05-26T16:57:52).

AccessDate
string
The last date the file was accessed (Wednesday, June 18, 2003).

AccessDateISO
string
The last date the file was accessed, in ISO format (2003-06-18T15:11:44).

WriteDate
string
The last date the file was written to (Wednedsay, June 18, 2003).

WriteDateISO
string
The last date the file was written to, in ISO format (2003-06-18T14:55:05).

Directory
boolean
True if the directory attribute is set.

Archived
boolean
True if the archive file attribute is set.

ReadOnly
boolean
True if the read-only file attribute is set.

Compressed
boolean
True if the compressed file attribute is set.

System
boolean
True if the system file attribute is set.

Hidden
boolean
True if the hidden file attribute is set.

Temporary
boolean
True if the temporary file attribute is set.

Normal
boolean
True if none of the boolean attributes are set.
__________________
Dermot

AMS Add-ons - xDialog.com

A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.
Reply With Quote
  #5  
Old 11-29-2007
Autoplayit07 Autoplayit07 is offline
Forum Member
 
Join Date: Nov 2007
Posts: 15
Hi Dermot!
thank for pointing that out, i know what you mean, but i have a hard time understanding how to set up a table.
is there any good and easy table example you could point me to, i've searched the forums ,but i can't find a easy example,that explains the details of how to setup a table,
i've allso looked in the tutorials for an tutorial on this.
allso the attributes i would like to retrieve into the table is not the creation date. or size of mb and sutge. its more like the information about the file. what media type and sutge.
hope i am not asking to much here.
i am new to this and i would realy like to learn,but some of the scripting is hard to learn ,what to combine with what and sutge.
thank you.
Reply With Quote
  #6  
Old 11-29-2007
Dermot Dermot is offline
Indigo Rose Customer
 
Join Date: Apr 2004
Location: Vancouver, Canada
Posts: 1,520
Tables are explained very well in the help file but in this case you don't have to create a table. The action returns a table.

if you do this:
Code:
result = File.GetAttributes(_ProgramFilesFolder.."\\AutoPlay Media Studio 7.0\\ams70.exe")
result will now be a table that holds all the values that are described in the help file. You access them like this; result.CreationDate, result.ReadOnly and so on.
__________________
Dermot

AMS Add-ons - xDialog.com

A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to find software? NigelLacey Visual Patch 2.0 4 10-11-2005 11:35 AM
method to index/compare user's files for update? intel352 Setup Factory 6.0 0 01-15-2003 04:08 PM
INFO: Why Files are Renamed in the DATA Folder Support AutoPlay Media Studio 4.0 Examples 0 10-24-2002 04:36 PM
HOWTO: "Hide" Externally Referenced Files Support AutoPlay Media Studio 4.0 Examples 0 10-23-2002 04:19 PM
Files in Config.SYS the Properties the File.PIF Bene Setup Factory 6.0 0 02-18-2002 08:21 PM


All times are GMT -6. The time now is 02:55 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software