Automatically searching & deleting sps

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Automatically searching & deleting sps

Thien Hop
Dear all,

May I know if there is a way to automatically search & delete files.sps in a
drive .ie anywhere in the C drive or D drive.

Any advice is highly appreciated!

Thanks a lot,

Hop

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Automatically searching & deleting sps

Manoj Soni
Dear

you just have to put a search in computer

Search Name = *.sps

Location = C:/D; or more

this will help


Manoj Soni
Assistant Data Analyst
INSTITUTE OF HEALTH MANAGEMENT RESEARCH
1, P.D. Marg, Near Sanganer Airport,
Jaipur. 302001. Rajasthan. INDIA.
Phone : 91-0141-2791431-34
Fax : 91-0141-2792138
[hidden email]

----- Original Message -----
From: "Tran Robert" <[hidden email]>
To: <[hidden email]>
Sent: Saturday, November 08, 2008 9:10 PM
Subject: Automatically searching & deleting sps


> Dear all,
>
> May I know if there is a way to automatically search & delete files.sps in
> a
> drive .ie anywhere in the C drive or D drive.
>
> Any advice is highly appreciated!
>
> Thanks a lot,
>
> Hop
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Automatically searching & deleting sps

Thien Hop
Dear Manoj Soni,

Sorry I did not make myself clear enough. Actually I want to write a script
in SPSS that can do the job of searching & deleting specific file type i.e
**.sps anywhere even in Recycle bin.

Thanks once again!

Hop
----- Original Message -----
From: <[hidden email]>
To: "Tran Robert" <[hidden email]>
Cc: <[hidden email]>
Sent: Sunday, November 09, 2008 1:18 PM
Subject: Re: Automatically searching & deleting sps


> Dear
>
> you just have to put a search in computer
>
> Search Name = *.sps
>
> Location = C:/D; or more
>
> this will help
>
>
> Manoj Soni
> Assistant Data Analyst
> INSTITUTE OF HEALTH MANAGEMENT RESEARCH
> 1, P.D. Marg, Near Sanganer Airport,
> Jaipur. 302001. Rajasthan. INDIA.
> Phone : 91-0141-2791431-34
> Fax : 91-0141-2792138
> [hidden email]
>
> ----- Original Message -----
> From: "Tran Robert" <[hidden email]>
> To: <[hidden email]>
> Sent: Saturday, November 08, 2008 9:10 PM
> Subject: Automatically searching & deleting sps
>
>
>> Dear all,
>>
>> May I know if there is a way to automatically search & delete files.sps
>> in a
>> drive .ie anywhere in the C drive or D drive.
>>
>> Any advice is highly appreciated!
>>
>> Thanks a lot,
>>
>> Hop
>>
>> =====================
>> To manage your subscription to SPSSX-L, send a message to
>> [hidden email] (not to SPSSX-L), with no body text except the
>> command. To leave the list, send the command
>> SIGNOFF SPSSX-L
>> For a list of commands to manage subscriptions, send the command
>> INFO REFCARD
>>
>
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Automatically searching & deleting sps

Peck, Jon
This is easy to do with programmability.  I don't have time to spell this out right now (on the way to the airport), but you can use
Python os.walk to iterate over all files on your system.
Use fnmatch.fnmatch to test the file name against the pattern you want
Use os.remove to delete a file that passes the test.

BE CAREFUL with this, or you could wind up with a lot of extra free space on your disk!

HTH,
Jon Peck

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Thien Hop
Sent: Sunday, November 09, 2008 2:58 AM
To: [hidden email]
Subject: Re: [SPSSX-L] Automatically searching & deleting sps

Dear Manoj Soni,

Sorry I did not make myself clear enough. Actually I want to write a script
in SPSS that can do the job of searching & deleting specific file type i.e
**.sps anywhere even in Recycle bin.

Thanks once again!

Hop
----- Original Message -----
From: <[hidden email]>
To: "Tran Robert" <[hidden email]>
Cc: <[hidden email]>
Sent: Sunday, November 09, 2008 1:18 PM
Subject: Re: Automatically searching & deleting sps


> Dear
>
> you just have to put a search in computer
>
> Search Name = *.sps
>
> Location = C:/D; or more
>
> this will help
>
>
> Manoj Soni
> Assistant Data Analyst
> INSTITUTE OF HEALTH MANAGEMENT RESEARCH
> 1, P.D. Marg, Near Sanganer Airport,
> Jaipur. 302001. Rajasthan. INDIA.
> Phone : 91-0141-2791431-34
> Fax : 91-0141-2792138
> [hidden email]
>
> ----- Original Message -----
> From: "Tran Robert" <[hidden email]>
> To: <[hidden email]>
> Sent: Saturday, November 08, 2008 9:10 PM
> Subject: Automatically searching & deleting sps
>
>
>> Dear all,
>>
>> May I know if there is a way to automatically search & delete files.sps
>> in a
>> drive .ie anywhere in the C drive or D drive.
>>
>> Any advice is highly appreciated!
>>
>> Thanks a lot,
>>
>> Hop
>>
>> =====================
>> To manage your subscription to SPSSX-L, send a message to
>> [hidden email] (not to SPSSX-L), with no body text except the
>> command. To leave the list, send the command
>> SIGNOFF SPSSX-L
>> For a list of commands to manage subscriptions, send the command
>> INFO REFCARD
>>
>
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Automatically searching & deleting sps

Art Kendall
I echo Jon's warning about finding yourself with extra free space.
What is the context in which you want to do this?

I have been using computers since 1970 and SPSS since 1972.  I think
doing this in a completely automated way is very dangerous.

If you are using a VAX or a Windows OS, use the systems search
function.  Go to the root of the device and do a search including
subdirectories or subfolders for *.sps.
At least look at the names of the subdirectories to see if some other
software might be using the .sps extension, after checking you can
select all   or select some then click delete.
It seems there should be analogous capabilities under the UNICES and MAC
OSs.

Art Kendall
Social Research Consultants



Peck, Jon wrote:

> This is easy to do with programmability.  I don't have time to spell this out right now (on the way to the airport), but you can use
> Python os.walk to iterate over all files on your system.
> Use fnmatch.fnmatch to test the file name against the pattern you want
> Use os.remove to delete a file that passes the test.
>
> BE CAREFUL with this, or you could wind up with a lot of extra free space on your disk!
>
> HTH,
> Jon Peck
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Thien Hop
> Sent: Sunday, November 09, 2008 2:58 AM
> To: [hidden email]
> Subject: Re: [SPSSX-L] Automatically searching & deleting sps
>
> Dear Manoj Soni,
>
> Sorry I did not make myself clear enough. Actually I want to write a script
> in SPSS that can do the job of searching & deleting specific file type i.e
> **.sps anywhere even in Recycle bin.
>
> Thanks once again!
>
> Hop
> ----- Original Message -----
> From: <[hidden email]>
> To: "Tran Robert" <[hidden email]>
> Cc: <[hidden email]>
> Sent: Sunday, November 09, 2008 1:18 PM
> Subject: Re: Automatically searching & deleting sps
>
>
>
>> Dear
>>
>> you just have to put a search in computer
>>
>> Search Name = *.sps
>>
>> Location = C:/D; or more
>>
>> this will help
>>
>>
>> Manoj Soni
>> Assistant Data Analyst
>> INSTITUTE OF HEALTH MANAGEMENT RESEARCH
>> 1, P.D. Marg, Near Sanganer Airport,
>> Jaipur. 302001. Rajasthan. INDIA.
>> Phone : 91-0141-2791431-34
>> Fax : 91-0141-2792138
>> [hidden email]
>>
>> ----- Original Message -----
>> From: "Tran Robert" <[hidden email]>
>> To: <[hidden email]>
>> Sent: Saturday, November 08, 2008 9:10 PM
>> Subject: Automatically searching & deleting sps
>>
>>
>>
>>> Dear all,
>>>
>>> May I know if there is a way to automatically search & delete files.sps
>>> in a
>>> drive .ie anywhere in the C drive or D drive.
>>>
>>> Any advice is highly appreciated!
>>>
>>> Thanks a lot,
>>>
>>> Hop
>>>
>>> =====================
>>> To manage your subscription to SPSSX-L, send a message to
>>> [hidden email] (not to SPSSX-L), with no body text except the
>>> command. To leave the list, send the command
>>> SIGNOFF SPSSX-L
>>> For a list of commands to manage subscriptions, send the command
>>> INFO REFCARD
>>>
>>>
>>
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD
>
>
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Automatically searching & deleting sps

Thien Hop
In reply to this post by Peck, Jon
Dear Jon & Kendall,

Thank you very much for your advices.

Since I've never used Python before so it seems to be a big challenge for me
to write a correct script. May I bother you with it when you have some time
to share.

Knowing that it is dangerrous to use the automatic deleting, I may use it
for cleaning other files type ie. temp or unwanted types

In addition, please advise what SPSS syntax/ script can be used to get any
other file (not SPSS) to run/ open ie. Excel file, PP.

Thank you very much,

Hop
----- Original Message -----
From: "Peck, Jon" <[hidden email]>
To: "Thien Hop" <[hidden email]>; <[hidden email]>
Sent: Sunday, November 09, 2008 10:43 PM
Subject: RE: Re: [SPSSX-L] Automatically searching & deleting sps


This is easy to do with programmability.  I don't have time to spell this
out right now (on the way to the airport), but you can use
Python os.walk to iterate over all files on your system.
Use fnmatch.fnmatch to test the file name against the pattern you want
Use os.remove to delete a file that passes the test.

BE CAREFUL with this, or you could wind up with a lot of extra free space on
your disk!

HTH,
Jon Peck

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Thien Hop
Sent: Sunday, November 09, 2008 2:58 AM
To: [hidden email]
Subject: Re: [SPSSX-L] Automatically searching & deleting sps

Dear Manoj Soni,

Sorry I did not make myself clear enough. Actually I want to write a script
in SPSS that can do the job of searching & deleting specific file type i.e
**.sps anywhere even in Recycle bin.

Thanks once again!

Hop
----- Original Message -----
From: <[hidden email]>
To: "Tran Robert" <[hidden email]>
Cc: <[hidden email]>
Sent: Sunday, November 09, 2008 1:18 PM
Subject: Re: Automatically searching & deleting sps


> Dear
>
> you just have to put a search in computer
>
> Search Name = *.sps
>
> Location = C:/D; or more
>
> this will help
>
>
> Manoj Soni
> Assistant Data Analyst
> INSTITUTE OF HEALTH MANAGEMENT RESEARCH
> 1, P.D. Marg, Near Sanganer Airport,
> Jaipur. 302001. Rajasthan. INDIA.
> Phone : 91-0141-2791431-34
> Fax : 91-0141-2792138
> [hidden email]
>
> ----- Original Message -----
> From: "Tran Robert" <[hidden email]>
> To: <[hidden email]>
> Sent: Saturday, November 08, 2008 9:10 PM
> Subject: Automatically searching & deleting sps
>
>
>> Dear all,
>>
>> May I know if there is a way to automatically search & delete files.sps
>> in a
>> drive .ie anywhere in the C drive or D drive.
>>
>> Any advice is highly appreciated!
>>
>> Thanks a lot,
>>
>> Hop
>>
>> =====================
>> To manage your subscription to SPSSX-L, send a message to
>> [hidden email] (not to SPSSX-L), with no body text except the
>> command. To leave the list, send the command
>> SIGNOFF SPSSX-L
>> For a list of commands to manage subscriptions, send the command
>> INFO REFCARD
>>
>
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD