NYP4N Posted December 27, 2010 Posted December 27, 2010 Hi, I hope that I havent overlooked any information about this, Ive looked at the help and searched for it on google. Anyway Im making a very important script to sort my downloadsfolder into a fine archive. But I got stuck... I want to sort out if a file is a TV-show and not a movie so i thought that I could search for anything like ex. s1e12 (season 1 episode 12) in the filename. The code I was trying to use was: ;Search for >"s" & Integer & "e" & Integer< in filename StringInStr($FileName, "s" & Int & "e" & Int) But it didnt work, so i guess that I'll have to use something else to find any integer. Suggestions?
Juvigy Posted December 27, 2010 Posted December 27, 2010 convert the integer to string like String(101)
ProgAndy Posted December 27, 2010 Posted December 27, 2010 You'll have to use reqular expressions StringRegExp($sFile, "s\d+e\d+") *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
NYP4N Posted December 27, 2010 Author Posted December 27, 2010 You'll have to use reqular expressions StringRegExp($sFile, "s\d+e\d+") Thanx, worked like a charm.
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