Aladdin Posted January 5, 2009 Share Posted January 5, 2009 hi, i want to delete a file from a folder which is at @DesktopDir. my problem is that i don't know the folder name but the folder has 'st02' word at the end of folder name. (without quotes) i know this is not the full name of folder but i want to delete a text file from it. FileDelete(@DesktopDir & "\st02\old.txt") the above code is not working because i don't know the full name of folder. please help me. _______________________________ Link to comment Share on other sites More sharing options...
Josbe Posted January 6, 2009 Share Posted January 6, 2009 hi, i want to delete a file from a folder which is at @DesktopDir. my problem is that i don't know the folder name but the folder has 'st02' word at the end of folder name. (without quotes) i know this is not the full name of folder but i want to delete a text file from it. FileDelete(@DesktopDir & "\st02\old.txt") the above code is not working because i don't know the full name of folder. please help me.I don't understand very well why you didn't know the name. Generic name? Although, you can check through FileFindFirstFile() function. The wildcard could be "*st02". AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Aladdin Posted January 6, 2009 Author Share Posted January 6, 2009 thanks for the quick reply but i could not understand this function. can you give me a example code? _______________________________ Link to comment Share on other sites More sharing options...
Josbe Posted January 6, 2009 Share Posted January 6, 2009 thanks for the quick reply but i could not understand this function. can you give me a example code?Precisely, the reason why I included the link. You can test the example included there. IMO, understandable. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Aladdin Posted January 6, 2009 Author Share Posted January 6, 2009 Precisely, the reason why I included the link. You can test the example included there. IMO, understandable.thanks but i was fail in achieving my goal in writing this part of my script. need more help :: _______________________________ Link to comment Share on other sites More sharing options...
FireFox Posted January 6, 2009 Share Posted January 6, 2009 @Aladdin I think you should use an udf wich search for folders and then you make string search in folder names for find the good one Cheers, FireFox. 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