473,473 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Right-click context menu - passing short file name without path

6 New Member
Hello charitable,
I have a repetitive task that requires the user to go to a command prompt, navigate to a folder (usually deep in the system), and perform a syntax scan on a file (with an in-house program), and this occurs thousands of times a year across a few users. In order to simplify this task, I have gone into the registry and created a key that allows the user to navigate to the file through the gui, right-click on the file, and then select the option "FScan", which is the name of our in-house Fortran scanning software. From there, the following code is executed:

cmd.exe /K "fscan %L"

I know I've seen a few others write about %L, or %1, trying to firgure out how to get the short file name or just the path, as it always seems to give us both the path and file name in one string.

Has anyone heard of an update that will allow us to grab just the path or just the file name?
If not, I'm looking for suggestions for a work-around.
Would it be possible to process the string in a batch file, and then put just the file name into the %L and continue with the operation (see the line below)?

cmd.exe /K "C:\BatchFiles\String2FileName.bat & fscan %L"
[execute String2FileName.bat, and then execute "fscan %L"]
Mar 12 '10 #1
0 2062

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Eric | last post by:
I would like to setup a two column layout for my web page using CSS. I would like the Left column width to be auto. Can I have the right column be offset by 8 pixels from the right edge of the...
8
by: André Hänsel | last post by:
Hi! When I put a table into a table and try to align it right, it works in IE but not in Firefox. Simplest code to reproduce: <html> <body> <table style="width: 100%"> <tr>
2
by: Dr. Richard E. Hawkins | last post by:
I've googled around, and asked everyone I know, but I still can't find any reference to anyone else having faced this particular IE bug with floats. I've put a page at...
22
by: Simon | last post by:
Hi, I have written a function to trim char *, but I have been told that my way could be dangerous and that I should use memmove(...) instead. but I am not sure why my code could be 'dangerous'...
10
by: Carolyn Marenger | last post by:
I think this is an easy one, but I have not been able to find it anywhere. In HTML, I used <center><img src="whatever.gif></center> to horizontally center a graphic on a page. What is the CSS...
19
by: ashkaan57 | last post by:
Hi, I have a page in a right-to-left language and I am trying to make some bulleted lists using <ul>, but it puts the bullets to the left. Is there any way I can set the bullets to be on the...
5
by: tshad | last post by:
I have a datagrid that I cannot get to right justify a money amount (which is just a label). No matter what I do - it still right justifies it. <asp:TemplateColumn Visible="true"...
12
by: Dio1080 | last post by:
Ok, I need help on a for loop nested program using for loops, I'm trying to use a patten that goes like this: 123456 12345 1234 123 12 1 but when I try it, it goes like this: 123456
1
by: JG | last post by:
Hello I've got an issue creating a web page. I've have two pictures sitting where I want them (one left and one right) and I have a heading over the left one but cannot get text to move over the...
2
by: Berlin Brown | last post by:
This is a simple div/layout question. I could easily solve the problem with a table, but I don't want to do that. I have a row of links. I want row 1 to have links and row 2 to have links. I...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.