Can any one help me out to find a batch command to unzip a file.
I do not want to use any external tool just want to unzip using .bat file.
Ths is not possible. the windows command line does not provide support for this.
Related
I have a requirement where i need to create and delete a text file on unix from my windows server where i have informatica installed.
Using workflow i was able to place file in unix but not able to find a way to delete already existing file.
Also the client does not want us to download any additional software like putty on windows server.
Please feel free to ask for more information if required.
if you are able to drop .sh (shell script) and execut it on unix then you can do that with "rmdir yourfolder" command, if you folder has andything under then you will need to use "rm -r yourfolder", if files inside the folder have any dependicies you need to use "rm -rf yourfolder".
Just make sure that you will navigate to the correct folder where you are deleting things.
Br, Aljaž.
Use Command Task in Informatica Workflow to invoke syntax mentioned by #Aljaz
I am working on a batch file and trying to write the correct windows commands.
1) Command-line from Windows
2) Use commands to scan the zip file so that it will look inside of the zip file for a specific string in the file within the zip file.
3) If the scan finds that specific string in the file that is within the zip file then move that zip file to another specified directory.
Is it possible using dos commands within a batch file?
I want to learn more on this. Anyone have any guidance or suggestions?
I can do the command:
unzip some-zip.zip
and it will produce a some-zip folder.
I don't want a default folder name, but to create my own. Nor do I want to do a mv after.
I don't see a command line option to handle this. Can I accomplish this easily with redirection (if indeed no command line option)? If so, will that work efficiently for a fairly large zip file (52 MB)?
Thanks
unzip file.zip -d destination_folder
I am writting expansion programs to a CAD program called 12d Model. The language I write these expansions in is simply called Macro language and it has a very limited API. So it doesn't have a way to find a file on Windows, list all files in a directory or download a file.
To overcome this I use simple ShellExecute and system calls. For example to list all files in a directory I use the system call "dir C:\ /B > C:\MyCurrentFolder\outfile.txt". One of my needs is to download and parse an XML file but the API has no download function.
Is there a system call to download a file from a URL? Is there some native way to do this? Maybe there is a Windows Application like regedit.exe or something that I can use to download a file?
If not, do you think it would be possible to do it through a batch script?
Windows does have built in FTP support using ftp.exe. So if you could find a FTP mirror of the file, or upload it to one yourself, that might work.
Yes there is a native way to do this. Use the msxsl.exe parser to download the xml file and save it to whatever location you would like. You can do this from the command prompt or from a batch file. Note the one caveat to this is you will need to use an xsl file that does not alter the xml file. The command would look something like this...
c:\msxsl.exe c:\myXML.xml c:\myXSLT.xsl > c:\myXML.xml
Note here the file located at c:\myXSLT.xsl cannot change the source file c:\myXML.xml
I keep seeing this phrase "download or create" in tutorials right after tofrodos. What would be an example of how to download or create? I just get stuck in
^
^
^
mode.
apt-get -y install tofrodos
Download or create ZPX_ubuntu_12-04_auto_installer.sh
The author means you need to transfer the "ZPX_ubuntu_12-04_auto_installer.sh" shell script to the server, and if necessary, change to the directory you saved the script in using the cd command, before entering the commands below:
fromdos ZPX_ubuntu_12-04_auto_installer.sh
chmod +x ZPX_ubuntu_12-04_auto_installer.sh
./ZPX_ubuntu_12-04_auto_installer.sh
He seems to be referring to a particular script included in a .zip file posted on a web forum.
You may be able to download the .zip file to your computer, extract it, and then use the sftp or scp program to transfer just the shell script to the server. Alternatively, you could use wget or curl to download the .zip file to the server and then the unzip command to unzip it.
A graphical SFTP client like FileZilla may help for the former approach. The Firefox add-on cliget may help for the latter, especially because the file is hosted on a password-protected web forum.
fromdos is just a utility program to convert a text file from DOS/Windows format to Unix format by stripping out all the carriage return characters. Perhaps using this command is necessary because the author of the script used a Windows text editor or an ASCII-mode FTP transfer before zipping up the file. Of course, you need the file on the server if you are trying to run the command on the server.