Jump to content

Recommended Posts

Posted (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 by sweept

Posted

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?

Posted (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 here

http://www.hydrogenaudio.org/forums/lofive...php/t54776.html

Ive tried making something out of it with nothing so far ,so if it isn't much to ask, please help in writing the batch

thanks again :hello:

Edited by sweept
Posted

Since cmd promt is not my best, here is a VBS script that should do what you want.

Save As ListDir.vbs

Option 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

Posted

Just copy and paste the following into a new cmd file, select multiple files and drag and drop them onto it:

@echo off & setlocal
for %%# in (%*) do call set var=%%~nx# %%var%%
echo:%var%
pause & goto :eof

Let me know if this is what you wanted!

Posted

thanks a bunch for letting me out of this cell! ...you defiantly gave me something to work with

ill try experimenting some if i fall again into some jam ill jump right back here for you're asistents

thanks for all the help guys it means a lot! :hello:

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
  • Recently Browsing   0 members

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