Computing.Net > Forums > Programming > Batch Programming

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch Programming

Reply to Message Icon

Name: sfahad
Date: September 7, 2007 at 22:31:57 Pacific
OS: WinXp
CPU/Ram: IntelOriginal 1.8Ghz/256M
Product: 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



Sponsored Link
Ads by Google

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

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.


0

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

Current directory:
ECHO %CD%


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch Programming

Advanced batch program www.computing.net/answers/programming/advanced-batch-program/14439.html

Batch Programming www.computing.net/answers/programming/batch-programming/3213.html

batch programming www.computing.net/answers/programming/batch-programming/11097.html