- GoodSpeed: AMD Ryzen 9 9900X (100-100000662WOF)+ Samsung 990 PRO 2TB MZ-V9P2T0BW
- gban: Ingyen kellene, de tegnapra
- ubyegon2: Airfryer XL XXL forrólevegős sütő gyakorlati tanácsok, ötletek, receptek
- Luck Dragon: Asszociációs játék. :)
- -szabi-: Kodi beállítása és használata CoreElec rendszeren
- -szabi-: Könyvtár megosztás windows 10 és KODI között SMB használatával
- Klaus Duran: Youtube AI szinkron
- sziku69: Fűzzük össze a szavakat :)
- vrob: Az utolsó DOS játékok 1996 - 1997-ben, egy korszak lezárul
- sziku69: Szólánc.
Hirdetés
Új hozzászólás Aktív témák
-
Mert a 0-val kezdodo szamokat (ha nincs benne 8 vagy 9) akkor az atoi c fuggveny octal-nak erelmezi, ha automata ertelmezesre van allitva (base=0):
The default is decimal, but you can specify octal 8, hexadecimal 16, or decimal 10. If 0 is the base, the string will be parsed as a hexadecimal if it has a leading 0x and as an octal if it has a leading 0. Otherwise, it will be treated as a decimal. -
Session problema lehet. Mostanaban a MS kavart valamit a session-okkel, mert en is tapasztalom, hogy az SMB kapcsolatok egy ido utan bontanak, es kell jo par masodperc (akar fel perc is), mig ujraepiti oket az OS.
Erdemes kiprobalni, hogy mount elott megprobalod bontani a kapcsolatot:NET USE /delete \\UNC\path
-
Ha 0-val kezdodik, akkor a parancs oktalis szamnak ertelmezi, tehat a 8 es 9-es szamok ervenytelenek, raadasul az ertek tizes szamrendszerben is mas lesz:
01 (okt) = 1 (dec)
07 (okt) = 7 (dec)
010 (okt) = 8 (dec)Itt van par jo megoldas:
https://stackoverflow.com/questions/14762813/remove-leading-zeros-in-batch-file -
Igen eleg egyszer kiadni a
SETLOCAL EnableDelayedExpansion
parancsot, ha menet kozben ki akarod valamiert kapcsolni akkor kell csak aSETLOCAL DisableDelayedExpansion
parancs. Viszont a valtozok hasznalatanal figyelni kell, hogy nem mindig %valtozo_nev%, hanem !valtozo_nev! formatumot is kell(het?) hasznalni. -
Ha nem baj, nem forditom le magyarra (megfelelo sort kiemeltem):
Parameter Extensions
When an argument is used to supply a filename then the following extended syntax can be applied:
We are using the variable %1 (but this works for any argument, including FOR parameters).
%~f1 Expand %1 to a Fully qualified path name - C:\utils\MyFile.txt
%~d1 Expand %1 to a Drive letter only - C:
%~p1 Expand %1 to a Path only e.g. \utils\ this includes a trailing \ which will be interpreted as an escape character by some commands.
%~n1 Expand %1 to a file Name without file extension or path - MyFile
or if only a path is present, with no trailing backslash, the last folder in that path.
%~x1 Expand %1 to a file eXtension only - .txt
%~s1 Change the meaning of f, n, s and x to reference the Short 8.3 name (if it exists.)
%~1 Expand %1 removing any surrounding quotes (")
%~a1 Display the file attributes of %1
%~t1 Display the date/time of %1
%~z1 Display the file size of %1
%~$PATH:1 Search the PATH environment variable and expand %1 to the fully qualified name of the first match found.The modifiers above can be combined:
%~dp1 Expand %1 to a drive letter and path only.
%~sp1 Expand %1 to a path shortened to 8.3 characters.
%~nx2 Expand %2 to a file name and extension only. -
-
Powershell:
$A510="c:\temp\A510\"
$fullstamp="2023-02-28"
$b_backup="\\server\backup"
Get-ChildItem $A510 -recurse -Filter *.* | ForEach-Object {
if ($_.Attributes -ne "Directory") {
if ($_.Length -gt 0) {
Start-Process -WorkingDirectory $A510 -FilePath "c:\Program Files (x86)\7-Zip\7z.exe" -ArgumentList "a `"$($b_backup)$($fullstamp).zip`" `"$($_.Directory)\$($_.Name)`"" -Wait
}
}
} -
Ez nekem mukodik x86-bol:
@echo off
set "A510=c:\temp\py"
set "fullstamp=2023-02-28"
set "b_backup=\\server\backup"
IF EXIST "%A510%" (
FORFILES /P "%A510%" /S /M *.* /C "cmd /S /C if @isdir==FALSE if @fsize GTR 0 0x22c:\Program Files 0x28x860x29\Microsoft Visual Studio\Shared\Python39_64\python.exe0x22 -c 0x22print(r'%b_backup%\%fullstamp%.zip @file')0x22"
)Kimenet:
\\server\backup\2023-02-28.zip certificates.py
\\server\backup\2023-02-28.zip search_dump.py
^CTerminate batch job (Y/N)? -
Oh, nem olvastam el:
To include special characters in the command line, use the hexadecimal code for the character in 0xHH format (ex. 0x09 for tab). Internal CMD.exe commands should be preceded with "cmd /c".
talan igy:IF EXIST "%A510%" (
FORFILES /P "%A510%" /S /M *.* /C "cmd /C if @isdir==FALSE if @fsize 0x22c:\Program Files 0x28x860x29\7-Zip\7z.exe0x22 a %b_backup%\%fullstamp%.zip @FILE"
) -
fyki:
If /C or /K is specified, then the remainder of the command line after
the switch is processed as a command line, where the following logic is
used to process quote (") characters:
1. If all of the following conditions are met, then quote characters
on the command line are preserved:
- no /S switch
- exactly two quote characters
- no special characters between the two quote characters,
where special is one of: &<>()@^|
- there are one or more whitespace characters between the
two quote characters
- the string between the two quote characters is the name
of an executable file.
2. Otherwise, old behavior is to see if the first character is
a quote character and if so, strip the leading character and
remove the last quote character on the command line, preserving
any text after the last quote character.talan igy jo lesz:
IF EXIST "%A510%" (
FORFILES /P "%A510%" /S /M *.* /C "cmd /C "if @isdir==FALSE if @fsize "c:\Program Files (x86)\7-Zip\7z.exe" a %b_backup%\%fullstamp%.zip @FILE"
) -
válasz
redwhite78 #1053 üzenetére
Akkor:
Private Sub Application_Quit()
If MsgBox("Elküldjem a kilépős emailt?", vbYesNo + vbCritical, "Nap végi email") = vbYes Then
Dim mail As MailItem
Set mail = Application.CreateItem(olMailItem)
mail.To = "email_to_send_to@server.address"
mail.CC = "email_to_send_cc@server.address"
mail.Subject = "kötelezõ subject"
mail.Send
Set mail = Nothing
Else
'Normál kilépés
End If
End Sub -
válasz
redwhite78 #1051 üzenetére
Nem, főleg, ha pl patchelés miatt újraindul a géped nap közben...
-
válasz
redwhite78 #1041 üzenetére
Akkor kiraksz egy outlook ikont a desktopra, amiben egy parancs fájl van, ami akkor fut le, amikor az outlookot bezárod (persze ez vsz nem működik akkor, ha a shutdown zárja le, mert akkor már nem fogja engedni vsz a szkriptet futni). Esetléeg outlookba írhatsz egy on_shutdown szkriptet:
Private Sub Application_Quit()
Dim mail As MailItem
Set mail = Application.CreateItem(olMailItem)
mail.To = "email_to_send_to@server.address"
mail.CC = "email_to_send_cc@server.address"
mail.Subject = "kötelezõ subject"
mail.Send
Set mail = Nothing
End Sub -
válasz
redwhite78 #1039 üzenetére
scheduled task - beállítva kb akkorra, mielőtt elmész melóból
-
válasz
redwhite78 #1037 üzenetére
-
válasz
sellerbuyer #832 üzenetére
Ez miért nem megy? [link]
Miért értelmetlen a szerver felől törölni? -
válasz
DrojDtroll #806 üzenetére
szerintem wmi-vel egyszerűen megoldható (ha más USB Mass storage nincs bedugva):
@ECHO OFF
SET source="c:\Temp\kiir.cs"
SET targetdir=\Temp\target\
FOR /F "skip=1 tokens=1" %%G IN ('wmic logicaldisk where "drivetype=2" get caption') DO (
mkdir "%%G%targetdir%"
copy %source% "%%G%targetdir%" /Y
) -
válasz
DrojDtroll #804 üzenetére
Igen - milyen OS? Milyen géped van, amibe 10 USB belemegy?
-
válasz
magyarzoltan #800 üzenetére
Asszem valami ilyen kell neked: [link]
De ha jól rémlik a FileSystemWatcher nem 100%-ban megbízható.
-
válasz
magyarzoltan #796 üzenetére
ezt szvsz batch-csel nem csinálod meg, hacsak nem te indítod a programot (minden alkalommal) amikor felülírja. HA egy futó process módosítgatja, akkor valami filerendszer filter driver-t kell csinálnod hozzá (vagy valami alkalmazást, ami folyamatosan szknenneli a fájlt, és ha változott, akkor lemásolja. De a második esetben simán lehet, hogy kimarad egy-két változat, ha gyakrabban változik a fájl, mint ahogy ellenőrzöd.
-
Biztos jó a könyvtár?
írass ki az IF előtt egy Errorlevel-t:
echo %ERRORLEVEL%
Hátha nem tud belépni a könyvtárba.Másrészt használhatot a következő formát is:
CD /D D:\Apache Tomcat 8.0.27\bin\
Egyrészt a /D meghajtót is vált, másrészt a CD-nek nem kell macskaköröm a path-hoz.cmd-ket pedig ne magukba, hanem CALL-lal hívd és lehetőleg ellenőrizd az ERRORLEVEL-t utána (hogy sikeresen lefutott-e).
-
válasz
sellerbuyer #789 üzenetére
rendszergazdaként?
runas vagy task shceduler - az utóbbi jobb, mert ott nem látszik password -
válasz
sellerbuyer #787 üzenetére
Vagy be kell tenni a HKLM Run-ba, vagy az alluser StartUp-ba.
-
Mármint úgy értetted, hogy írja meg már valaki helyetted?
A leveledből nekem úgy tűnt, hogy te szeretnéd megcsinálni, csak valahol elakadtál:
1) hogy lehet fájlokat másolni
2) hogyan lehet a változókat használni
3) hogy lehet a hónap adott napját váltotzóban megkapniFeltételeztem, hogy az első (esetleg az első kettő) még menne, így csak felhívtam a figyelmed az épp előtted történt beszélgetésre, ami arról szólt, hogy hogyan lehet az aktuális dátumot három változóba (%yy%, %mm%, %dd%) berakni.
-
mod:
Na, megvan, ez csinálja:c:\temp>echo:|date
The current date is: 13/04/2016
Enter the new date: (dd-mm-yy)Ez feldolgozza a második sort (eltárolja a dátum sorrendet), majd a az első sort, abból kiszedi a dátumot.
Ez pedig a változónevekhez adja a dátumot - az a trükk, hogy a változónév is változóból jön:
set %%a=%%d
set %%b=%%e
set %%c=%%fNagyon elmés
-
válasz
Geripapa #677 üzenetére
bocs, benne maradt egy két dolog a tesztelésből, és nem is írtam, mit csinálj vele
1) _rootfolder után kell a tényleges könyvtár, amiben/alatt alatt az sv fájlok vannak
2) a kconvars.exe könyvtárában kell elhelyezni a fájlt .cmd végződéssel (.bat kerülendő) és onnan futtatniSetlocal EnableDelayedExpansion
@ECHO OFF
SET _rootfolder="C:\Temp"
FOR /F %%A IN ('dir %_rootfolder% /s/b^|find "sysframe.sv"') DO (
SET _file=%%A
SET _dir=!_file:~0,-11!
SET _newFile=!_dir!sysframe.va
kconvars !_file! !_newfile!
) -
válasz
kovacsz2414 #638 üzenetére
set mydate=%date:~5,2%-%date:~8,2%-%date:~0,4%
Ha nyelv/területi beállítás-független kell, akkor ez segíthet: [link]
-
Az Excelből dolgozna-t hogy képzeled el?
vbs-sel:
If UCase( Right( WScript.FullName, 12 ) ) = "\CSCRIPT.EXE" Then
wscript.echo "Please copy the script to the Desktop and drag a file to the script icon"
wscript.quit -1
End If
if WScript.Arguments.Count() <> 1 Then
wscript.echo "Please drag a file to the script icon"
wscript.quit -1
End If
filename = WScript.Arguments(0)
searchstring = InputBox("Search:")
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(filename)
lineno = 1
lines = ""
Do Until f.AtEndOfStream
line = f.ReadLine
If InStr(line, searchstring) > 0 Then
lines = lines & lineno & vbTab & line & vbCrLf
End If
lineno = lineno + 1
Loop
f.Close
If lines <> "" Then
wscript.echo lines
Else
wscript.echo searchstring & " not found"
End If -
output dir végére kell lezáró \
if WScript.Arguments.Count() <> 2 Then
wscript.echo "Usage:" & vbcrlf & "splitvcf.vbs filename output_dir"
wscript.quit -1
End If
filename = WScript.Arguments(0)
odir = WScript.Arguments(1)
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(filename)
id = 0
Do Until f.AtEndOfStream
line = f.ReadLine
If Trim(line) = "BEGIN:VCARD" Then
startwrite = true
Set fo = fso.CreateTextFile(odir & Right("00000" & id, 6) & ".vcf", True)
End If
If startwrite Then
fo.Write line & vbCrLf
End If
If Trim(line) = "END:VCARD" Then
startwrite = false
fo.Close
id = id + 1
End If
Loop
f.Close -
splitvcf.vbs
filename = "C:\Temp\textfile"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(filename)
id = 0
Do Until f.AtEndOfStream
line = f.ReadLine
If Trim(line) = "BEGIN:VCARD" Then
startwrite = true
Set fo = fso.CreateTextFile("C:\Temp\" & id & ".vcf", True)
End If
If startwrite Then
fo.Write line & vbCrLf
End If
If Trim(line) = "END:VCARD" Then
startwrite = false
fo.Close
id = id + 1
End If
Loop
f.Close -
@echo off
:teszt_eleje
for /F "tokens=1,*" %%G in ('tasklist /nh /fi "imagename eq iexplore.exe"') do (
set van=1
)
if defined van (
echo "fut az explorer..."
REM SLEEP 10:
PING -n 11 127.0.0.1>nul
goto teszt_eleje
) else (
echo "NEM fut az explorer"
REM SLEEP 10:
PING -n 11 127.0.0.1>nul
goto teszt_eleje
)Nincs fent nálam a foobar - IE-vel tesztetem - de tetszőlegesen módosítható...
-
válasz
stryker.hu #508 üzenetére
if not exist - nem adtad meg, mi nem létezik
@echo off
mkdir c:\ment\1\
if not exist "%USERPROFILE%\Desktop\" (
xcopy "%USERPROFILE%\Asztal" c:\ment\1\
)
else (
move "%USERPROFILE%\Desktop" c:\ment\1\
) -
válasz
morfondőr #454 üzenetére
TC-nek kell egy kis idő, mire lefrissíti a felületét. Ha újraindítod, biztos ott lesz - de van olyan is néha, hogy gombként nem jelenik meg, de a legördítő menüben már ott van.
Amúgy nem hálózati mappát próbálsz meg subst-olni így?Storno, most olvasom, hogy nem az... Amúgy a skydrive is lehet a bűnös - lehet, hogy lefoglalja a rendszer a mappa lekérésével és emiatt késik a subst...Ezt találtam még neked - subst helyett registry:
InconstancyHowever restart of a system destroys a virtual disk. What to do? A disk can be created after startup. But what to do, when a disk is needed on early steps of a startup? For example, to run services? There is system feature to start a virtual disk from the system registry:
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices]
"H:"="\\??\\E:\\Cloud\\Skydrive"
It is enough to create a text file with the extension .REG and run it. When the next starting up of a system, the virtual disk will be exist at logon. It needs to define a name of disk and path. Note that each backslash in the path is doubled.
-
válasz
latyika1994 #413 üzenetére
Nekem nem egészen kerek, amit itt leírtál - a cd /d sem nyit meg semmi böngésző-ablakot, amiben "szaladgálni" lehetne - sőt így bezárni sem lehet.
Mit is szeretnél pontosan csinálni?
Megnyitni egy fájl böngészőt, és ha az becsuktad, akkor nyitni egy másikat? -
válasz
Speeedfire #396 üzenetére
Indítsd WScritből (akármi.vbs). Csak ennyi kell bele:
CreateObject("Wscript.Shell").Run "becsfájl.bat",0,True -
válasz
beastlord #393 üzenetére
Igen, pingre szerintem volt itt már példa, network configra pedig nézd meg ezt: netsh
Pingre:
SET DestIP=192.168.1.101
SET LANName="Local Area Connection"
SET ConfigIP=192.168.1.199
SET ConfigMask=255.255.255.0
SET ConfigGW=192.168.1.1
SET ConfigDNS=192.168.1.1
:ping
ping %DIP% -t 1 >null 2&
IF ERRORLEVEL 1 goto :config
PAUSE 1
GOTO :ping
:config
netsh interface ip set address name=%LANName% static %ConfigIP% %ConfigMask% %ConfigGW% 1
netsh interface ip set dns "Local Area Connection" static %ConfigDNS% -
válasz
Baryka007 #369 üzenetére
Ezt mind batch-ben szeretnéd megcsinálni?
Szöveges fájlból a FOR /F -el tudsz adatbázisszerűen kiolvasni adatokat.
Ha már nincs fejlesztői környezeted, de szeretnél valami csinálni, akkor inkább már vbs-t csinálj. Sokkal több a lehetőséged és könnyebb dolgod is lesz (pl. tudsz fejlettebb adatszerkezeteket is használni).
Új hozzászólás Aktív témák
- Lenovo ThinkPad L15 / Ryzen5 / 16gb ram / 256gb SSD / FHD kijelző / Windows 11
- Apple MacBook Air M2 2022 8GB RAM 500GB SSD
- Mac Mini M4 Pro 14c/20c/48GB/512SSD/3X Thunderbolt 5 + Logitech MX Key S bill
- Nux NDL-3 Hook Drum and Loop - dobgép és looper pedál
- újszerű MacBook Air M1 256GB SSD space gray asztroszürke Apple magyar
- Oppo Reno7 5G 256GB, Kártyafüggetlen, 1 Év Garanciával
- BESZÁMÍTÁS! ASRock B550M R5 5600 32GB DDR4 512GB SSD RTX 4060 TI 16GB Zalman N5 Chieftec 700W
- Dell Precision 5540 i7-9850H 16GB 512GB Nvidia Quadro T1000 15.6" FHD 1 év garancia
- Telefon felvásárlás!! Apple Watch Series 6/Apple Watch Series 7/Apple Watch Series 8
- Lenovo ThinkPad T14 Gen1 Ryzen5
Állásajánlatok
Cég: FOTC
Város: Budapest