Sign in to follow this  
Followers 0
NYP4N

StringInStr( any integer )

4 posts in this topic

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?

Share this post


Link to post
Share on other sites



convert the integer to string like

String(101)

Share this post


Link to post
Share on other sites

You'll have to use reqular expressions :x

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

Share this post


Link to post
Share on other sites

You'll have to use reqular expressions :x

StringRegExp($sFile, "s\d+e\d+")

Thanx, worked like a charm.

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