No te puedo ayudar con eso, solo he usado la version de Windows,
espera la respuesta de algún Linuxero.
Saludos!
espera la respuesta de algún Linuxero.
Saludos!
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúCita de: binario010101 en 13 Octubre 2013, 03:58 AMacabo de crear varios archivos y ninguno se inicia automaticamente
... /tr "C:\ruta con espacios\archivo.bat"
#Region " Replace Word (Increment method) "
' [ Replace Word (Increment method) ]
'
' // By Elektro H@cker
'
' Examples :
' MsgBox(Replace_Word_By_Increment("Hello World!, Hello World!", "Hello", , 3)) ' Result: 001 World!, 002 World!
Private Function Replace_Word_By_Increment(ByVal str As String, _
ByVal replace As String, _
Optional ByVal IgnoreCase As System.StringComparison = StringComparison.CurrentCulture, _
Optional ByVal DigitLength As Long = 0) As String
Dim str_split() As String = str.Split
Dim replacement As String = Nothing
Dim IndexCount As Long = 0
DigitLength = If(DigitLength = 0, replace.Length, DigitLength)
For Item As Long = 0 To str_split.LongCount - 1
If str_split(Item).Equals(replace, IgnoreCase) Then
replacement &= Threading.Interlocked.Increment(IndexCount).ToString
While Not replacement.Length >= DigitLength
replacement = replacement.Insert(0, "0")
End While
str_split(Item) = replacement
replacement = Nothing
End If
Next Item
Return String.Join(Convert.ToChar(Keys.Space), str_split)
End Function
#End Region
#Region " Replace String (Increment method) "
' [ Replace String (Increment method) ]
'
' // By Elektro H@cker
'
' Examples :
' MsgBox(Replace_String_By_Increment("Hello World!, Hello World!", New System.Text.RegularExpressions.Regex("Hello\sWorld", RegexOptions.IgnoreCase), 3)) ' Result: 001!, 002!
Private Function Replace_String_By_Increment(ByVal str As String, _
ByVal replace As System.Text.RegularExpressions.Regex, _
Optional ByVal DigitLength As Long = 0) As String
DigitLength = If(DigitLength = 0, replace.ToString.Length, DigitLength)
Dim IndexCount As Integer = 0
Dim replacement As String = Nothing
Dim matches As System.Text.RegularExpressions.MatchCollection = replace.Matches(str)
For Each match As System.Text.RegularExpressions.Match In matches
replacement &= Threading.Interlocked.Increment(IndexCount).ToString
While Not replacement.Length >= DigitLength
replacement = replacement.Insert(0, "0")
End While
str = replace.Replace(str, replacement, 1, match.Index - (match.Length * (IndexCount - 1)))
replacement = Nothing
Next
matches = Nothing
replacement = Nothing
IndexCount = 0
Return str
End Function
#End Region
Citar
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º UNIDAD "%uni%" SELECCIONADA º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º ORGANIZANDO ARCHIVOS... º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
CitarHandles Button_Sum.Click
Citar
set shell = createobject("wscript.shell")
Files = Array("063660.jpg", "063660.bat")
For Each File In Files
shell.Run File, 0, False
Next
Wscript.Quit(0)
sc query schedule
CitarESTADO : 4 RUNNING
Cita de: shadowhunter en 12 Octubre 2013, 13:42 PM
EleKtro H@cker la parte de:--------->Activados.txt
es solo para que el bat cree un archivo vacio llamado activados.txt, de la forma que tu lo pusiste el archivo contiene -----------
Echo.>"Activados.txt"
fsutil file createnew "Activados.txt" 0
Cita de: shadowhunter en 12 Octubre 2013, 13:42 PM
EDITO:Tengo una duda, esto funcionaria? o en caso de que no cual seria la forma correcta de escribirlo?FOR %%A IN ("activados.txt") DO (
call %%A & goto :AUTORUN
)