Page 1 of 1 1
Topic Options
#51729 - 2000-10-10 01:21 PM file in use
Anonymous
Unregistered


when deleteting a file wich is already in use (in a logon script) the system stops with the message file in use (r)etry and so on. Is there a way around this problem ?
Top
#51730 - 2000-10-10 05:40 PM Re: file in use
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

There is a command under Windows 95 calling deltree, which can handle open files and which doesn't stopped during execution.

With the command f.e. deltree /y c:\~*.* you can remove a lot of temporary files from your local workstation.
Greetings.

BTW: the command works better for Windows NT then Windows 95. Remarkable thing.

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#51731 - 2000-10-11 05:11 PM Re: file in use
Anonymous
Unregistered


nice idea... could be helpfull later... but i only need/want to delete one file not the whole dirctory....

Thanks anyway

Top
#51732 - 2000-10-11 05:20 PM Re: file in use
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
what command are you using to delete the file?

Bryce

Top
#51733 - 2000-10-12 09:24 AM Re: file in use
Anonymous
Unregistered


i use the standard dos delete command.

shell "%comspec% /c del abc.xyz"

Top
#51734 - 2000-10-12 02:27 PM Re: file in use
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
By using the DEL command it may hang when your file is open. At that point ou must have the capability of entering the correct answer.
For our situation this message will be showing in a hidden dos box. So you don't know where the script is waiting for and you can't enter a character in a hidden box.

The problem exists for Windows 9x systems. By Windows NT you will get the following message:

code:

The process cannot access the file because
it is being used by another process.

deltree can also be used for an individual file.
Greetings.

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#51735 - 2000-10-12 03:16 PM Re: file in use
Anonymous
Unregistered


Sorry to insist.. but i'm looking for a way to have the login script simply go on without deleting the file, stopping or asking for something

thanks

Top
#51736 - 2000-10-12 04:06 PM Re: file in use
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
why not use kix's built in del command?

del "<filename>"

if the file was in use @error will be able to tell you. Either way the script will not stop running if the file is in use.

Bryce

Top
#51737 - 2000-10-12 05:24 PM Re: file in use
Anonymous
Unregistered


this was the right answer ... and such and easy one !!!

THANKS A LOT

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (mole) and 2107 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.06 seconds in which 0.029 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org