task of moving temp file at startup

I want my win98 to perform a task of moving all files in c:\windows\temp to c:\windows\mytemp
and make folder c:\windows\temp empty at every bootup. This is because backup can help me as
i have many tar.gz file that are extracted in temp folder when i open it and have habit of deleting any file permenantly.
so recovery from this deletion require me to win98 to do that task.
b123coderAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

stevenlewisCommented:
modify your autoexec.bat
with this command
move c:\windows\temp\*.* c:\windows\mytemp
then when you boot up it will move all the files
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
stevenlewisCommented:
Note this will increase your bootup time
0
stevenlewisCommented:
or you can create a batch file and call it from your autoexec.bat
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

b123coderAuthor Commented:
does it also copy directories in temp dir
0
stevenlewisCommented:
No, xcopy or xxcopy does that
http://www.xxcopy.com
If using xcopy (or xxcopy) then you need to have the autoexec.bat say sometihng like
assuming you put xxcopy in the c:\windows directory
c:\windows\xxcopy /h /i /c /k /e r /y c:\windows\temp\*.* c:\widows\mytemp
or if using xcopy
c:\windows\xcopy /h /i /c /k /e r /y c:\windows\temp\*.* c:\widows\mytemp
xcopy commands
http://www.computerhope.com/xcopyhlp.htm#03
0
BillDLCommented:
What program are you using to extract the .gz files?

You MIGHT be able to easily resolve this problem by creating a folder C:\UNZIP and then setting this as the default "extract to" folder from within the user options.

This is how I have it set on my system for WinRAR and WinZip, and it saves the temp file from getting so cluttered that you can't tell the unpacked contents from the normal temp debris.

If the program doesn't have a user option to change this folder, then perhaps it could be set through the registry or an associated .INI file.
0
BillDLCommented:
Just looked at your profile and I see a lot of comments for Linux.  I assume you have a dual-boot machine whereby Linux can use the c:\windows\temp folder?
0
b123coderAuthor Commented:
BillDL,
             Yes i have dual boot. But what if i have got/brought any .tar.gz files which have windows exe files, i have to extract it on windows onmy with winzip 9 which temporarily extract tar file to c:\windows\temp and suppose i accidently delete that .tar.gz file brought from friend or from internet then.....
                  at leaset i have tar file extracted in c:\windows\temp
0
BillDLCommented:
You should be able to set WinZip to use any other folder that you want as an "extract to" folder.  I have version 8, but I can't imagine that they would have changed these user options to make it less versatile.  The following is based on version 8, so maybe the options will be in different places.

Open WinZip and look under the "Options" menu > "Configuration".  Open the "Folders" tab, and you should there see:

Startup Folder - change to the folder where you always save the compressed archives
Extract Folder - change to c:\unzip
Add Folder - set to "open archive" folder
Working Folder - change to c:\unzip
Checkout Base - change to c:\unzip
Temp Folder - change to c:\unzip

Obviously you have to create the C:\UNZIP folder beforehand.

Now go to the "System" tab.

Look for the settings for "Explorer Shell Extensions" and make sure that it is set to "show context menu" or "use shell extension".  This adds a Right-Click menu to whatever type of compressed archives it has been associated with and can open.  These are found under the "Associations" for which there will be options. It's up to you whether you want a collapsed Right-Click menu, or whether it shows Winzip icons, etc.

If you have other programs installed in Windows that are capable of opening .arj, .lha and .arc archives, then you can set these as external programs under the "Program Locations" tab.  In that tab, you should also have the option to set your virus scanning software to scan the archives being opened, and to set an "External Viewer" for programs that are not associated with WinZip.  Always best to set this to windows NotePad.

There should be a miscellaneous tab in which you can disable the "Wizard Interface" that likes to start up when you open WinZip.  Keep it to "Classic" mode.  The other options are self-explanatory.

Save the settings. and close WinZip.

Now, when you right-click on a compressed archive and select "Extract To..." you will already have C:\Unzip selected as the "Extract To" folder.  There will also be another right-click menu option "Extract to Folder: x:\<path>\archivename", where x:\<path>  will be the full path to the folder that the archive is in, and "archivename" will be the name of the archive file minus the file type.

If you use this option, it will create a new folder named after each archive that you unzip, and will keep all your files separated.

It sounds to me like you are just double-clicking on the archive files and accepting the default "Extract To" folder that has been set either by the person who packed the archive, or by your current WinZip settings.

Have a look at these settings and I think that you will be saved a lot of hassle looking for a solution that really might not be needed for what you are doing.

If you are using WinZip in DOS, then there is a WinZip command line utility, but it doesn't run in FULL DOS.  It is, nevertheless, handy if you like working from batch files within Windows.  The download will be on the WinZip site.

Let me know if this is any help to you.


0
BillDLCommented:
Thank you, b123coder
0
stevenlewisCommented:
ditto
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.