forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Problem with deleting files

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
icon
Newbie


Joined: 17 Aug 2002
Posts: 7

PostPosted: Fri Jan 02, 2004 3:01 pm    Post subject: Problem with deleting files Reply with quote

I would like to delete some files in a specific directory, I use the following command:

FILE DELETE,@text(list1),CONFIRM

However it maybee possible, that one or more files are in use and therefore cannot be deleted. The problem is, that in this case I like that the program skips those file and continue to delete the other files that are not in use.

Any trick how to do this?

Thanks
Icon
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri Jan 02, 2004 4:42 pm    Post subject: Reply with quote

You have to delete files one by one. You can do this by using this code:

Code:
%z = 0
repeat
  file delete,@item(list1,%z),CONFIRM
  %z = @succ(%z)
until @equal(%z,@count(list1))

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
icon
Newbie


Joined: 17 Aug 2002
Posts: 7

PostPosted: Fri Jan 02, 2004 6:48 pm    Post subject: Reply with quote

Thanks so far, that working. However there is still a small issue remaining: on those file who are in use, the script has a timeout of about 4 seconds when he tries to delete such a file until he proceeds to the next ones.

Any possibility to improve this?
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri Jan 02, 2004 6:50 pm    Post subject: Reply with quote

You could try to use another parameter in steed of "CONFIRM". Maybe there is a "IGNORE" one or something? Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group