LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2009)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 28 Aug 2009 11:28:17 +0800
Reply-To:     Thien Hop <thienhop@gmail.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Thien Hop <thienhop@gmail.com>
Subject:      Re: Changing file property
Comments: To: Georg.Maubach@mrsc.info
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
              reply-type=original

Hi John & Georg,

Thank you so much the command SCRIPT in sps is great. It runs very well.

Sorry I have one more question, if there is a way to set execution timing to such a script? It will be programed to only run on a certain date.

Big thanks!

Robert

----- Original Message ----- From: <Georg.Maubach@mrsc.info> To: <thienhop@gmail.com>; <SPSSX-L@LISTSERV.UGA.EDU> Sent: Thursday, August 27, 2009 8:46 PM Subject: AW: Re: Changing file property

Hi Robert,

SPSS has the command SCRIPT .

HTH

Best regards

Georg Maubach

-----Ursprüngliche Nachricht----- Von: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] Im Auftrag von Thien Hop Gesendet: Donnerstag, 27. August 2009 13:30 An: SPSSX-L@LISTSERV.UGA.EDU Betreff: Re: Changing file property

Hi John,

Thank you so much! your script is great it!. I wonder if there is any syntax (**.sps) that can call a script to run without going to Utilities and click "run script..."

Big appreciation,

Robert ----- Original Message ----- From: "John McConnell" <jmcconnell@analyticalpeople.com> To: <SPSSX-L@LISTSERV.UGA.EDU> Sent: Wednesday, August 26, 2009 10:37 PM Subject: Re: Changing file property

> Hi Thien > > I think an alternative to Marta's suggestion in that case is to run a > script (a .sbs file) to change the attributes. > > For example... > > -------------------------------------- > Option Explicit > > > Sub Main > > Dim strFile As String > Dim iAttrib As Integer > > strFile = "c:\temp\test.txt" > > 'optionally check the current attributes > iAttrib = GetAttr(strFile) > > 'Set them to normal > SetAttr strFile,0 'Normal > > End Sub > -------------------------------------- > > If you want this to happen from a syntax (.sps) file then you can save > the script with a name e.g. setFileAtt.sbs and run it from syntax > using the SCRIPT command > > e.g. > SCRIPT 'c:\temp\setFileAtt.sbs'. > > The setattr options are: > > VB Constant Value Explanation > vbNormal 0 Normal (default) - as above > vbReadOnly 1 Read-only > vbHidden 2 Hidden > vbSystem 4 System file > vbArchive 32 File has been changed since last backup > vbAlias 64 File name is an alias (Macintosh only) > > Cheers > > John > > > -----Original Message----- > From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf > Of Marta García-Granero > Sent: 26 August 2009 15:11 > To: SPSSX-L@LISTSERV.UGA.EDU > Subject: Re: Changing file property > > I wrote >> Thien Hop wrote: >>> Hi MartaGG, >>> >>> Thanks a lot for your scripts. It seems to run with Python installed >>> right? Unfortunately I'm using SPSS12 and do not have Python also. >> >> HOST command doesn't require Python, as a matter of fact, I don't use >> Python (yet), nor have it installed (yet). >>> >>> Is there any work around solution for normal syntax/ script in v12 >> >> To my knowledge, it should work OK with SPSS 12, unless the HOST >> command was implemented later. >> >> > I have googled a bit and it looks like the HOST command was first > implemented in SPSS 13. Therefore, you will not be able to use it with > SPSS 12, and I don't think there's a workaround for it. Sorry, perhaps > it is time to update to a newer version? (15 is still my favorite > flavor) > > MGG > > -- > For miscellaneous SPSS related statistical stuff, visit: > http://gjyp.nl/marta/ > > ===================== > To manage your subscription to SPSSX-L, send a message to > LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except > the command. To leave the list, send the command SIGNOFF SPSSX-L For a > list of commands to manage subscriptions, send the command INFO > REFCARD > > ===================== > To manage your subscription to SPSSX-L, send a message to > LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except > the command. To leave the list, send the command SIGNOFF SPSSX-L For a > list of commands to manage subscriptions, send the command INFO > REFCARD

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


Back to: Top of message | Previous page | Main SPSSX-L page