welby345 Posted November 1, 2006 Share Posted November 1, 2006 (edited) I searched the forums, but did not find what I was looking for...maybe I didn't search the right key words...so here goes. I have a working script that parses out extraneous characters from a simple text file. I can run the command as follows: cleanup samplefile.tx From a command line, and the file samplefile.txt will be opened and cleaned up. What I want is the ability to drag the txt file from explorer onto the cleanup.exe file (compiled from autoit). How do I go about this? Edited November 1, 2006 by welby345 Link to comment Share on other sites More sharing options...
welby345 Posted November 1, 2006 Author Share Posted November 1, 2006 (edited) I think I found the problem. When I drag and drop, I have a long string describing the file. When I go command line, I have a simple file name. I think I have to parse out the inout string and get everything between the last \ and the end of the cmdline[1]. Bujt shouldn't file open work with the full path? Shouldn't both ways work? Edited November 1, 2006 by welby345 Link to comment Share on other sites More sharing options...
MHz Posted November 2, 2006 Share Posted November 2, 2006 Full path, yes. Relative path, yes. These answers are based on competant code created by you. Use double quotes around paths with spaces as needed within your code. The last "I think..." seems unnecessary. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now