Tech News is a blog created by Wasim Akhtar to deliver Technical news with the latest and greatest in the world of technology. We provide content in the form of articles, videos, and product reviews.
Want to Creat Executable Jar file for your Application
Run cmd command from java
import java.util.*;
public class CmdVerJavaDemo{
BufferedReader x=new BufferedReader(new InputStreamReader(System.in));
Runtime myrun;
Process output;
public static void main(String args[])throws IOException
{
(new CmdVerJavaDemo()).runCmdCommand("dir *.*");
}
public void runCmdCommand(String cmd)throws IOException
{
System.out.println("Your Cmd Command is "+cmd);
myrun=Runtime.getRuntime();
output=myrun.exec("cmd /c "+cmd);
String outStr="";
String fDate="";
String fName="";
x=new BufferedReader(new
InputStreamReader(output.getInputStream()));
for(int i=0;i<=100 && outStr!=null;i++)
{
outStr=x.readLine();
if(outStr==null)
{
System.out.println("File Data has null
.");
}
else
{
System.out.println(outStr);
StringTokenizer strToken=new
StringTokenizer(outStr);
int countT=strToken.countTokens();
if(i>=6)
{
fDate=strToken.nextToken();
fName=strToken.nextToken();
fName=strToken.nextToken();
fName=strToken.nextToken();
fName=strToken.nextToken();
fDate=fDate.replaceAll("/","-");
System.out.println("File Name :"+fName);
System.out.println("File Date :"+fDate);
output=myrun.exec("cmd /c md backup");
output=myrun.exec("cmd /c copy .\\*.* .\\backup");
output=myrun.exec("cmd /c md "+fDate);
File
fileName=new File(fName);
if((fileName.isDirectory()))
System.out.println("File Name :"+fName+" is Directory");
else
{
System.out.println("File Name :"+fName+" is File");
output=myrun.exec("cmd /c copy .\\"+fName+" .\\"+fDate);
}
}
}
}
}
}
Subscribe Sharingbywasim by sms free
-- Wasim Akhtar
Want to google search by your google talk
Google Talk Guru is an experimental service that allows people to get information like sports results, weather forecasts, definitions etc via chat. It works on many popular chat applications that support Google Talk.
To start using Google Talk Guru:
1. Sign into a chat client that supports Google Talk
2. Send a chat invitation to guru@googlelabs.com or click the "Invite myself to chat with Guru" link below.
3. Find guru in your contact list and send chat queries to guru using the examples below:
Sport scores: | score arsenal |
---|---|
Weather: | weather Nairobi |
Calculate: | 123 * 45 |
Currency: | 120 KES to USD |
Definition: | define laptop |
Translation: | translate earth to French |
Web result: | web Mount Kenya |
Help: | help translate |
-- Wasim Akhtar
Make a own folder locker by command prompt
just copy the code and save it in any .bat file
find "if NOT %pass%== wasim" and change wasim to any thing you like to
password.
save it and run it create a folder private again run it it prompt to
lock or not folder press y your private folder is locked and hidden
to unlock again run it enter your password yours Private folder keep
your private things in private folder .
------------------------------------From
Here----------------------------------
@ECHO OFF
title Folder Private
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Private goto MDLOCKER
:CONFIRM
echo Are you sure you want to lock the folder(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Private "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter password to unlock folder
set/p "pass=>"
if NOT %pass%== wasim goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Private
echo Private created successfully
goto End
:End
------------------------------------End
Here----------------------------------
--
Wasim Akhtar
Invitation to connect on LinkedIn
I'd like to add you to my professional network on LinkedIn.
© 2011, LinkedIn Corporation Want To Download Torrent File By Using Google
Simple way...just type:
*ur file name* filetype:torrent --
Subscribe to:
Posts (Atom)
Windows 11 Dev Insider Preview Builds ChangelogUPDATE: Addition of Windows 11 Insider Preview build 26120.670 released to Dev channel. In this changelog article, we list all Insider Previ...
|