The double quotes write to a file when you use the Write file operator. Change it to something
like ... Print #1, "abc" and you will get in your batch file abc.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
I dont want to write to a file, I just want to have something like a var..is it even possible at all in a batch file?
My batch file will receive as arguments this: "C:\" and "lol.jpg"
and i want it to be able to call my other program with this as argument "C:\lol.jpg"
as another question, is there any command in batch files to convert a short filename to a long filename?
as a yet another question, is it possible at all in the registry to pass as a argument (in folder extension thing) only the path of clicked file, or only the filename instead of passing the full pathfilename?
In your batch file you can receive passed parameters like so...
Code:
REM %1 = SomeFileNameToSearchForWithAnyExtension
Dir %1.* /s
This takes a parameter of a filename without the extension to do a search for
in the DOS command window. The "%" sign is like a variable to receive
passed parameters from the command line or shelled parameters, etc.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Can you post your code, maybe there is some other reason. If you are receiving it like "C:\""*.jpg" then
it must be the way your passing it or in your batch file your placing double quotes around the variables?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
The program that's giving the "C:\" as argument can't be changed, so I just have to work with it.
What I need is some kind of way of manipulate strings through the batch file so I can take the quotes off and just do %path_without_quotes/*.jpg like you said
If you could strip out the double quotes before they are sent to the batch file then you could use the vb Replace
function. I dont think that there is a way to do it in DOS but I will look.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.