Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default How to kill the zipped files in C:\Document and Settings\LogginName\Temp\ using code for this strange Problem

Hi Guys,

I have a strange Problem with my code.

My code zips the file from File Server and then opens and reads it in
excel application.

The code then deletes the file in the Temp folder in the path given
above.

Initially we were using winzip but now we are using windows shell
programming where the code is

obj.Namespace(sourceFileName) Namespace(DestinationFilename).Items

Ideally this function needs to unzip the *.xls item in the Temp
folder.


Problem:

The above function using windows is also creating a Tempory Folder
inside Temp with New name and then

pasting the *.xls inside it.

Ideally when I am using

Kill "Temp/*.xls" I am not able to delete the zipped file.

this statement also creates a Temporary folder.

This was not happening when we were using winzip.


Please guys guide me to kill the zipped files without forming
temporary folder in the Temp directory.

Also Please send me the code to delete the folders including the all
the files in Temp folder.

Regards,

Prince

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default How to kill the zipped files in C:\Document and Settings\LogginName\Temp\ using code for this strange Problem

I don't use this (except when rummaging through Ron de Bruin's code!), but you
can use:

On error resume next
Kill "C:\somefolder\filename.zip"
on error goto 0

The "on error resume next" will hide any error caused by the file not being
there. (And it'll also hide the error caused by not being able to delete the
file.)



Yuvraj wrote:

Hi Guys,

I have a strange Problem with my code.

My code zips the file from File Server and then opens and reads it in
excel application.

The code then deletes the file in the Temp folder in the path given
above.

Initially we were using winzip but now we are using windows shell
programming where the code is

obj.Namespace(sourceFileName) Namespace(DestinationFilename).Items

Ideally this function needs to unzip the *.xls item in the Temp
folder.

Problem:

The above function using windows is also creating a Tempory Folder
inside Temp with New name and then

pasting the *.xls inside it.

Ideally when I am using

Kill "Temp/*.xls" I am not able to delete the zipped file.

this statement also creates a Temporary folder.

This was not happening when we were using winzip.

Please guys guide me to kill the zipped files without forming
temporary folder in the Temp directory.

Also Please send me the code to delete the folders including the all
the files in Temp folder.

Regards,

Prince


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default How to kill the zipped files in C:\Document and Settings\Loggin Name\Temp\ using code for this strange Problem


See the unzip code on this page
http://www.rondebruin.nl/windowsxpunzip.htm

See how I delete the temp forlere like this

FSO.deletefolder Environ("Temp") & "\Temporary Directory*", True

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Yuvraj" wrote in message ...
Hi Guys,

I have a strange Problem with my code.

My code zips the file from File Server and then opens and reads it in
excel application.

The code then deletes the file in the Temp folder in the path given
above.

Initially we were using winzip but now we are using windows shell
programming where the code is

obj.Namespace(sourceFileName) Namespace(DestinationFilename).Items

Ideally this function needs to unzip the *.xls item in the Temp
folder.


Problem:

The above function using windows is also creating a Tempory Folder
inside Temp with New name and then

pasting the *.xls inside it.

Ideally when I am using

Kill "Temp/*.xls" I am not able to delete the zipped file.

this statement also creates a Temporary folder.

This was not happening when we were using winzip.


Please guys guide me to kill the zipped files without forming
temporary folder in the Temp directory.

Also Please send me the code to delete the folders including the all
the files in Temp folder.

Regards,

Prince

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Zipped excel files bloated after security changes [email protected] Excel Discussion (Misc queries) 0 October 23rd 06 05:30 AM
Strange problem with Code PH NEWS Excel Worksheet Functions 1 September 27th 06 10:16 AM
zipped files Louise Excel Worksheet Functions 3 July 27th 06 11:00 AM
how do i open zipped files searching for discussion New Users to Excel 2 July 16th 06 05:07 AM
Sort and print .pdf files into one .pdf document via VBA code? [email protected] Excel Discussion (Misc queries) 0 June 3rd 06 02:11 PM


All times are GMT +1. The time now is 04:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"