Sign in to follow this  
Followers 0
Aladdin

i don't know full name of folder

6 posts in this topic

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.


_______________________________

Share this post


Link to post
Share on other sites



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".

Share this post


Link to post
Share on other sites

thanks for the quick reply but i could not understand this function. can you give me a example code?


_______________________________

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 ::

_______________________________

Share this post


Link to post
Share on other sites

@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.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0