(10.04.2025 10:44 )Martin.Henz schrieb: Also z.B. für die Datei c:\temp\aa&bb.pdf:
cmd /c c:\temp\aa"&"bb.pdf
es funktioniert aber auch
c:\temp\"aa&bb.pdf"
Wusste ich nicht, mein Fehler bei meinen Tests, ich habe alles in "" geschrieben (cmd /c "c:\temp\aa"&"bb.pdf"), dann geht es nicht..
Aus neugier ausprobiert wie es ist, wenn im Ordnerpfad noch Leerzeichen enthalten sind, dann so: C:\"temp 0"\test\"aa&bb.txt"
Dennoch unpraktisch, dann muss ich ja den Pfad untersuchen.
Ich habe den Teil gelesen und wohl missverstanden:
https://learn.microsoft.com/en-us/window...mmands/cmd schrieb:If you specify /c or /k, the cmd processes, the remainder of <string>, and the quotation marks are preserved only if all of the following conditions are met:
You don't also use /s.
You use exactly one set of quotation marks.
You don't use any special characters within the quotation marks (for example: & < > ( ) @ ^ | ).
You use one or more white-space characters within the quotation marks.
The <string> within quotation marks is the name of an executable file.
If the previous conditions aren't met, <string> is processed by examining the first character to verify whether it's an opening quotation mark. If the first character is an opening quotation mark, it's stripped along with the closing quotation mark. Any text following the closing quotation marks is preserved.
Das NI mitgelieferte VI macht nur cmd /c "%s" und das funktioniert dann nicht mit &.
Ich habe wirklich viel gegoogelt um das irgendwie gelöst zu bekommen und dann gibt es mehrere Lösungen, danke Martin
Timo