Deleteing non-DataEase files

Questions and Answers about DataEase for Windows

Deleteing non-DataEase files

Postby robb » Mon May 09, 2011 8:44 am

Is there any way of deleteing non-DataEase files such as .doc, .docx, .xls etc... in a procedure?
robb
 
Posts: 45
Joined: Thu Jan 07, 2010 9:20 am
Has thanked: 0 time
Been thanked: 0 time
 

Re: Deleteing non-DataEase files

Postby benjji » Mon May 09, 2011 9:16 am

how about the filedelete cdf ?
benjji
 
Posts: 167
Joined: Fri Mar 14, 2008 11:26 am
Location: Stoke-on-Trent & Manchester & Middlesborough
Has thanked: 0 time
Been thanked: 0 time
 

Re: Deleteing non-DataEase files

Postby Phil Winkler » Mon May 09, 2011 12:29 pm

This might be a time when doing a backup and a restore to a new location would accomplish just that.
Phil Winkler
PLM Consulting, Inc.
pwinkler@plmconsulting.com
Phil Winkler
 
Posts: 890
Joined: Fri Sep 07, 2007 12:45 pm
Has thanked: 0 time
Been thanked: 0 time
 

Re: Deleteing non-DataEase files

Postby robb » Mon May 09, 2011 12:41 pm

fieldelete cdf is not one i've come across before. What are the settings for it?
robb
 
Posts: 45
Joined: Thu Jan 07, 2010 9:20 am
Has thanked: 0 time
Been thanked: 0 time
 

Re: Deleteing non-DataEase files

Postby Phil Winkler » Mon May 09, 2011 1:31 pm

Why not just a cmd prompt, do a dir *.do* to see what is there and then do a del *.do*

Repeat for all other odd file types.

Since you know what file extensions are valid this shouldn't take too long. Heck, sort by extension and browse thru the listing. The Non-DataEase files should stand out. Use Expolorer (Ugh) or Windows Commander to make it easy and safer.
Phil Winkler
PLM Consulting, Inc.
pwinkler@plmconsulting.com
Phil Winkler
 
Posts: 890
Joined: Fri Sep 07, 2007 12:45 pm
Has thanked: 0 time
Been thanked: 0 time
 

Re: Deleteing non-DataEase files

Postby Graham Smith » Mon May 09, 2011 2:35 pm

You can create a batch file that can be run from within the program, but you may find that it's better to do that from outside the database. In particular, if you try and delete any files that someone might have open (like a log) then the procedure can hang up.
Graham Smith
DataSmith, Delaware
"For every expert there is an equal and opposite expert.", Arthur C. Clarke (1917 - 2008)
"X-Clacks-Overhead: GNU Terry Pratchett"
User avatar
Graham Smith
 
Posts: 2501
Joined: Fri Sep 07, 2007 11:31 am
Location: Delaware, USA
Has thanked: 0 time
Been thanked: 1 time
 

Re: Deleteing non-DataEase files

Postby benjji » Mon May 09, 2011 2:36 pm

robb wrote:What are the settings for it?

Function Name - FileDelete
ELF Library Name - CDFS2.DLL
Return Type - Int
Parameters - Filename : String

usage: FileDelete("c:\folder\file.doc") .
benjji
 
Posts: 167
Joined: Fri Mar 14, 2008 11:26 am
Location: Stoke-on-Trent & Manchester & Middlesborough
Has thanked: 0 time
Been thanked: 0 time
 

Re: Deleteing non-DataEase files

Postby robb » Mon May 16, 2011 3:56 pm

The FileDelete route works exactly as i wanted, thanks.
robb
 
Posts: 45
Joined: Thu Jan 07, 2010 9:20 am
Has thanked: 0 time
Been thanked: 0 time
 
 

Return to DataEase for Windows

Who is online

Users browsing this forum: No registered users and 1 guest

cron