Jump to content

Recommended Posts

Posted

I searched on both of these topics before posting here.

1.)

I want to know how to put quotations on variables (folder names)

example:

$dir = FileSelectFolder( "Choose working directory", "", 1+2+4, "")

$dir returns C:\temp dir\dir with spaces\

i want to pass that variable to a DOS command via RunWait(@ComSpec etc....

How can I accomplish this?

2.) How can I find out the folder a file I've chosen sits in?

example

$file1 = FileOpenDialog("Open JPG", "F:\", "JPG (*.jpg)", 1 + 4 )

$file1 returns F:\picture dir\vacation pictures\vacation1.jpg

I want to get both the filename (accomplished by the FileOpenDialog command) and the folder name. I've thought of a number of different string commands but cannot come up with anything solid. Basically I want to have the next FileOpenDialog start in the folder of the last one.

Thanks in advance for all of your help.

-redfive

Posted

Fir your Dir with spaces, use """" & $dir & """"

For your file parsing, see the new gafrost UDF in the beta: _PathSplit()

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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
×
×
  • Create New...