Computing.Net > Forums > Programming > Batch Programming

Batch Programming

Reply to Message Icon

Original Message
Name: sfahad
Date: September 7, 2007 at 22:31:57 Pacific
Subject: Batch Programming
OS: WinXp
CPU/Ram: IntelOriginal 1.8Ghz/256M
Model/Manufacturer: Intel Pentium IV
Comment:

Sir,
I am in beginning stage of batch programming. And want to know that, when i right click on folder, through batch programming....it takes the name of folder in variable defined in the batch program... so as to use that folder name. And i already add its entry in registry...in right click menu.

Please help me in this way, and consider the simplest way.
I really appreciate ur responce!!
Thanks in advance!!

Syed Fahad Hussain


Report Offensive Message For Removal


Response Number 1
Name: User123456789
Date: September 9, 2007 at 06:19:40 Pacific
Reply: (edit)

So basically you want the name of the current directory into a variable, which that script then can use to do whatever.

I am fan of awk/sed/grep, and I would propose that but you need a copy of those files, and there are no official versions of them (not from Microsoft I mean).

You then could use these statements :

C:\Temp>cd | awk " { print \"set folder=\"$0 } " > folder.cmd

C:\Temp>call folder

C:\Temp>set folder=C:\Temp

C:\Temp>echo %folder%
C:\Temp

But there are standard MS tools that do the same, don't know how though.

I can help you with a copy of these executables, they are legal and free and have no viruses, I promise.


Report Offensive Follow Up For Removal

Response Number 2
Name: Razor2.3
Date: September 9, 2007 at 18:14:35 Pacific
Reply: (edit)

Current directory:
ECHO %CD%


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Batch Programming

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge