Jump to content

filename in text file


Kyme
 Share

Recommended Posts

it's some chance to make one script to read files from one folder whit videos and make one .txt and add there all videos name???

This may be a little simplistic but you can get a list of all files in a folder by running dir *.* >list.txt in a command prompt. That would get the file name of the files but not the "name" of the video itself.

P

All spelling above is fictional, any resemblance to actual spelling is purely accidental. No dictionaries where harmed in the writing above.

Link to comment
Share on other sites

This may be a little simplistic but you can get a list of all files in a folder by running dir *.* >list.txt in a command prompt. That would get the file name of the files but not the "name" of the video itself.

P

wow....i don't know how to use cmd in autoit....then i choise little simpe way....i forgot this one^^
Link to comment
Share on other sites

wow....i don't know how to use cmd in autoit....then i choise little simpe way....i forgot this one^^

$title = "Select files"

$file = FileOpen(@ScriptDir & "\aaa.txt", 1)

$var = FileOpenDialog($title, @WindowsDir & "", "All (*.*)" , 1 + 4 )

If @error Then

MsgBox(4096,"","No File(s) chosen")

Else

$var = StringReplace($var, "|", @CRLF)

FileWrite($file, $var)

EndIf

but i wanna make only for files name...he write me directory too:|

some ideea how to fix this???

tnx

Edited by Kyme
Link to comment
Share on other sites

can someone please help me whit this...

i wanna write the file name whit out extension.....how the f. to do it????? ;)

$message = "Hold down Ctrl or Shift to choose multiple files."
$file = FileOpen(@ScriptDir & "\aaa.txt", 1)
$var = FileOpenDialog($message, @WindowsDir & "", "All (*.*)" , 1 + 4 )

If @error Then
    MsgBox(4096,"","No File(s) chosen")
Else
    $var = StringReplace($var, "|", @CRLF)
    $var = StringReplace($var, @WorkingDir, "Folder="&@WorkingDir&@CRLF)
    FileWrite($file, $var)

EndIf
Link to comment
Share on other sites

try this:

$message = "Hold down Ctrl or Shift to choose multiple files."
$file = FileOpen(@ScriptDir & "\aaa.txt", 1)
$var = FileOpenDialog($message, @WindowsDir & "", "All (*.*)" , 1 + 4 )

If @error Then
    MsgBox(4096,"","No File(s) chosen")
Else    
    $vids = StringSplit($var, "|")  
    FOR $i = 0 to UBound($vids)-1
        FileWriteLine($file, StringTrimRight($vids[$i],4))
    NEXT
EndIf
Edited by cyanidemonkey

My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...