Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-06-2011, 12:27 AM   #1
LQ Newbie
Registered: Jul 2011
Posts: 1

Rep: Reputation: Disabled
Convert bat to .sh

I have code to download image on windows, but, i have a hosting linux, i want to run code on linux, but i dont know.Plz help me

PHP Code:
@echo off

set PHPEXE=C:\php\php.exe

rem PHPEXE PHPFILE Website_name Db_prefix Website_root DB_name Db_username Db_password Ignore_list_file_name
"%PHPEXE%" "%PHPFILE%" "" "sgm" "" "" "" "rooT@db1001" "%IGNORELISTFILE%" 
Old 07-06-2011, 01:16 AM   #2
ReliaFree Maintainer
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,779
Blog Entries: 1

Rep: Reputation: 243Reputation: 243Reputation: 243
Don't know what shell you're using, but I wouldn't be surprised if it was BASH. In that case, start here -->
Old 07-06-2011, 02:13 AM   #3
LQ Newbie
Registered: Jun 2011
Distribution: Ubuntu
Posts: 26

Rep: Reputation: Disabled
Something like that (if the PHP command line interface client is installed) :
"${PHPEXE}" "${PHPFILE}" "" "sgm" "" "" "" "rooT@db1001" "${IGNORELISTFILE}"
Save this code in a file, make it executable (chmod 755 yourfilename) and put it where you have your downloadimages.php et ignore_list.txt files
Old 07-06-2011, 02:57 AM   #4
John VV
LQ Muse
Registered: Aug 2005
Posts: 15,646

Rep: Reputation: Disabled
that windows bat dose not download a photo
it runs the php file"downloadimages.php " -- we have no way of knowing what is in it
then passes the arguments "Website_name Db_prefix Website_root DB_name Db_username Db_password Ignore_list_file_name"
to the unknown "downloadimages.php " file to grab ( i am assuming)

DB_name, Db_username, Db_password

unless the site you run this against is OWNED by you
this might be illegal
0 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Convert DOS bat file to shell script spiderdog Linux - Newbie 2 06-21-2010 03:54 PM
How to convert a batch file(.bat) to script file(.sh) manas_sem Programming 4 06-28-2007 01:10 PM
convert .bat / .csh file to .sh files massoo Programming 1 03-06-2006 07:10 PM
The Bat! designator Linux - Software 4 11-03-2003 02:54 PM
autoexe.bat genghis Linux - Newbie 4 03-14-2003 10:33 PM

All times are GMT -5. The time now is 05:50 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration