PDA

View Full Version : How do I deleting a file



NewsArchive
01-04-2008, 04:16 AM
I want to delete a TPS file but only if it has a specific date. Is that
possible with SetupBuilder?

Thanks,
Bob

NewsArchive
01-04-2008, 04:17 AM
Please pardon my spelling. How do I delete a file... Better.

Bob Langer

NewsArchive
01-04-2008, 04:17 AM
What date are you talking about File Name, date of Creation, Modification or
Last Accessed ?
Terry Davidson

NewsArchive
01-04-2008, 04:18 AM
Hi Bob,

> I want to delete a TPS file but only if it has a specific date. Is that
> possible with SetupBuilder?

Yes, absolutely no problem ;-) See attached screenshot.

Use the "Get File Information..." script function to retrieve the file date.
Then an If... Statement to see if it has a specific date.

In my demo, it deletes the file if it is dated 07-SEP-2007.

Does this help?

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.7
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
01-05-2008, 12:52 PM
Friedrich, I emailed you privately. Did you receive it?

Bob

NewsArchive
01-05-2008, 12:52 PM
Bob,

No, I did not receive it :-( I also checked my spam folder, but nothing.

Could you please resend the email?

Friedrich

NewsArchive
01-05-2008, 12:53 PM
Hi Friedrich,

Thank you for your help. I think I entered this correctly and the script
compiles with out errors but when I ran it the file was not deleted. Here is
what I entered:

Set Variable %FILEDATE% to FUNCTION:Get File Information(File Date) of file
:"c:\easychurch\pledge.tps" (Evaluate Expression)

If %FILEDATE% Equals "2007/10/10" Then

Delete Files "c:\easychurch\pledge.tps"

End

I looked in every sample file and could not find this one. Mine has
(Evaluate Expression)and yours does not.

I have version 6.7.2083.

Again, thanks for your help.

Bob

NewsArchive
01-05-2008, 12:54 PM
Bob,

> Thank you for your help. I think I entered this correctly and the script
> compiles with out errors but when I ran it the file was not deleted. Here
> is
> what I entered:
>
> Set Variable %FILEDATE% to FUNCTION:Get File Information(File Date) of
> file
> :"c:\easychurch\pledge.tps" (Evaluate Expression)
>
> If %FILEDATE% Equals "2007/10/10" Then
>
> Delete Files "c:\easychurch\pledge.tps"
>
> End
>
> I looked in every sample file and could not find this one. Mine has
> (Evaluate Expression)and yours does not.
>
> I have version 6.7.2083.
>
> Again, thanks for your help.

You are using the wrong function ;-) You are using "Set Variable..." and
*not* "Get File Information..."

See attached screenshot. Does this help?

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.7
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
01-05-2008, 12:55 PM
Wonderful, I made the changes and ran a test. The file was removed. Ran it
again and the new file with the same name was not removed.

Thank you very much. Your customer support is as great as your product.

Bob

NewsArchive
01-05-2008, 12:55 PM
Hi Bob,

> Wonderful, I made the changes and ran a test. The file was removed. Ran
> it again and the new file with the same name was not removed.
>
> Thank you very much. Your customer support is as great as your product.

Thank YOU :)

Friedrich