Page 1 of 1 1
Topic Options
#188263 - 2008-06-18 04:03 PM list and remove mp3 files
tandrade Offline
Just in Town

Registered: 2008-06-18
Posts: 2
Hi,

I need to create a script to list and remove mp3 files in LogIn.
Suggestion?

Top
#188264 - 2008-06-18 04:11 PM Re: list and remove mp3 files [Re: tandrade]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
List MP3 files from where? The local system, the user’s home folder? You want to do this at logon? That might slow things down considerably. Running it as an admin script would be better imho.

You could use the DirPlus UDF to list all files, check the extension of each file and delete is if it is .mp3.

UDF Library » DirPlus() - a recursive dir tool
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#188265 - 2008-06-18 04:11 PM Re: list and remove mp3 files [Re: tandrade]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Look at the DIRPLUS() UDF and DEL in the manual.

For the UDF see the UDF page at http://www.kixtart.org/udf

[edit] Dang Mart you did it again \:\) [/edit]


Edited by Gargoyle (2008-06-18 04:12 PM)
_________________________
Today is the tomorrow you worried about yesterday.

Top
#188266 - 2008-06-18 04:13 PM Re: list and remove mp3 files [Re: tandrade]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
yeah - don't.

You should run an admin script instead.. use DirList() or one of the other UDFs to locate the files - log them first & review the log. Then use the same script to remove. This way, you can script in exceptions if you need to.

I have a similar script, running as a service on our file servers where home folders reside, and reports run every Wednesday and deletes every Sunday via scheduled task.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#188267 - 2008-06-18 04:23 PM Re: list and remove mp3 files [Re: Glenn Barnas]
tandrade Offline
Just in Town

Registered: 2008-06-18
Posts: 2
find in all drives and write in the file, mp3files.txt
example:

userabc
c:\windows\system32\files\musics\ACDC\tnt.mp3
....

Top
Page 1 of 1 1


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

Who's Online
0 registered and 640 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.056 seconds in which 0.025 seconds were spent on a total of 13 queries. Zlib compression enabled.

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