I am writing a windows batch script which does the following:
1.Find the latest created zip file on a remote server and copy it to local server.
2.Extract zip file to dmp file.
3.Replace the filename from filename.zip to filename.dmp and run the import command.
I was able to do the first 2 as follows:
for /f "tokens=* delims= " %%a in ('dir/b/a-d/o-d W:\*.jar') do (
set latest=%%a & goto :done
echo We Will copy: !latest! >> %LOG_FILENAME%
copy W:\!latest! G:\BatchJobs\DataRefresh\MPADEV\JarDataFile
However I am not able to achieve the 3rd Step.
My command will look like this
imp filename.dmp--Where I have filename.zip