- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To run a batch file in folder "test" I read up on system with
result = SYSTEM("C:\test\analysis.bat")
and it works. But if the folder's name has blank characters, the system reads only the characters before the first blank. For instance if the folder is "new example" and I use
result = SYSTEM("C:\new example\analysis.bat")
the following error occurs:
'C:\new' is not recognized as an internal or external command, operable program or batch file.
Could someone let me know how to solve it?
Many thanks
Hamid
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To run a batch file in folder "test" I read up on system with
result = SYSTEM("C:testanalysis.bat")
and it works. But if the folder's name has blank characters, the system reads only the characters before the first blank. For instance if the folder is "new example" and I use
result = SYSTEM("C:new exampleanalysis.bat")
the following error occurs:
'C:new' is not recognized as an internal or external command, operable program or batch file.
Could someone let me know how to solve it?
Many thanks
Hamid
Try this :
result = SYSTEM('"C:new exampleanalysis.bat"')
or
result = SYSTEM("""C:new exampleanalysis.bat""")
Pathes with blank must be enclosed with quotes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this :
result = SYSTEM('"C:new exampleanalysis.bat"')
or
result = SYSTEM("""C:new exampleanalysis.bat""")
Pathes with blank must be enclosed with quotes.
Thank you very much for this. They both work.
Hamid
(h.amini = haminin)

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page