#149154 - 2005-10-04 06:12 AM
Re: DEL Command
|
Sealeopard
KiX Master
   
Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
|
|
|
Top
|
|
|
|
#149155 - 2005-10-04 06:00 PM
Re: DEL Command
|
StarwarsKid
Seasoned Scripter
   
Registered: 2005-06-15
Posts: 506
Loc: Oregon, USA
|
To clarify: Should I then use the env variable, %comspec% /c, instead of explicitly calling cmd.com?
NTDOC, It appears that I can't delete subdirectories with your CD suggestion due to a share violation.
Code:
debug on IF @UserID = Techwall OR Wordp OR Homework DEL 'c:\tempdrive\*' /h /s CD c:\tempdrive\ SHELL "%comspec% /C RD c:\tempdrive\" ENDIF EXIT Quote:
The process cannot access the file because it is being used by another process.
SeaLeopard: I just implemented your CleanDirectory.UDF and it works great. Thanks for the lead. 
FINAL CODE: Code:
call "@ScriptDir\UDF\cleandirectory.udf" call "@ScriptDir\UDF\DateMath.udf" call "@ScriptDir\UDF\FULLFILE.udf" IF @UserID = "Techwall" OR @UserID = "Wordp" OR @UserID = "Homework" DEL 'c:\tempdrive\*' /h /s $rc=cleandirectory('c:\tempdrive','*') ENDIF EXIT
Edited by StarwarsKid (2005-10-04 07:12 PM)
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 811 anonymous users online.
|
|
|