sweept Posted March 6, 2008 Posted March 6, 2008 (edited) .. a simple batch that passes 1% to "any odd commands" but so it works on multiple files in selections.... after some files are selected...they can be sent to a batch... the batch recalls the files and recharges a predefined command for them ...any help with this will be great!TIA Edited March 9, 2008 by sweept
IcemanND Posted March 6, 2008 Posted March 6, 2008 So you want to give the CMD file a wild card file list *.txt a?c.txt, or listed individual files a.txt b.txt c.txt, or do you want to drag selected files onto the icon and have them processed?
sweept Posted March 6, 2008 Author Posted March 6, 2008 (edited) OK, allow me to refine what ill need that IMO it will make things simpler"a batch file that lists out the files dropped over end echo's out all files to a one liner output (file.ext,file.ext,file.ext)"so actually the files are dropped over the batch & echo's the files out to a temp.txt ,with files listed on to one line after some searching this is what i could come up with ,i wont paste it here as it isn't exactly what we need herehttp://www.hydrogenaudio.org/forums/lofive...php/t54776.htmlIve tried making something out of it with nothing so far ,so if it isn't much to ask, please help in writing the batchthanks again Edited March 8, 2008 by sweept
gunsmokingman Posted March 9, 2008 Posted March 9, 2008 Since cmd promt is not my best, here is a VBS script that should do what you want.Save As ListDir.vbsOption Explicit Dim Act :Set Act = CreateObject("Wscript.Shell") Dim Fso :Set Fso = CreateObject("Scripting.FileSystemObject") Dim F1, F2, F3, F4, F5, ParentFolder, Ts Dim A1 A1 = vbCrLf & "------------------------------" & vbCrLf If WScript.Arguments.Count = 0 Then MsgBox "Error: This Needs At Least One Foldr Drop On This," & vbCrLf & _ "Script To Be Able To List It Sub Folder",4128,"Error No File" Else For Each F1 In WScript.Arguments If Right(InStr(F1,"."),5) Then'-> If You Want To List Files Only Code Here Else'-> List Contents Of Parent Folder Set ParentFolder = Fso.GetFolder(F1)'-> Open The Text File Set Ts = Fso.CreateTextFile(ParentFolder.Name & ".txt") Ts.WriteLine " Start Time " & Time() & A1 F4 = F4 & ParentFolder.Path & A1 For Each F2 In ParentFolder.Files F4 = F4 & F2.Name & vbCrLf Next F4 = F4 & A1'-> List Contents Of Parent Sub Folder For Each F3 In ParentFolder.SubFolders F4 = F4 & F3.Path & A1 For Each F5 In F3.Files F4 = F4 & F5.Name & vbCrLf Next Next End If Next End If Ts.WriteLine F4 Ts.Close() Act.Run(Chr(34) & ParentFolder.Name & ".txt" & Chr(34)),1,True
sweept Posted March 9, 2008 Author Posted March 9, 2008 so we have a VBS for this.. thanks Gunsmoking, lets see what the batch cmd geni comes up with, for this now
Yzöwl Posted March 9, 2008 Posted March 9, 2008 Just copy and paste the following into a new cmd file, select multiple files and drag and drop them onto it:@echo off & setlocalfor %%# in (%*) do call set var=%%~nx# %%var%%echo:%var%pause & goto :eofLet me know if this is what you wanted!
sweept Posted March 9, 2008 Author Posted March 9, 2008 thanks a bunch for letting me out of this cell! ...you defiantly gave me something to work withill try experimenting some if i fall again into some jam ill jump right back here for you're asistentsthanks for all the help guys it means a lot!
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