Jump to content

Spaces in filenames


Recommended Posts

Hello. Hopefully this will be an easy fix so that I can get back rollin on this bit of code. I am trying to run() an excel spreadsheet, but when I go to call up the file AutoIt is breaking apart the file name.

(i.e "test page.xls" gives me an error that test.xls and page.xls could not be found)

I have renamed the file test_page.xls and it works fine, but I do not want to have to go through and rename all the files, because there are macros that depend on the specific file name.

Thanks.

Link to comment
Share on other sites

  • Developers

eJan,

  Thanks for your reply, but that did not work. Are there a set of characters to enter in the place of a space so that AutoIt sees the space instead of two seperate words?

Thanks

<{POST_SNAPBACK}>

use double quotes around the file name and single around the command like:

Run('exel.exe "c:\temp\file name with spaces.xls" ')
Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...