What is the Windows equivalent of the diff command?
Run this in the CMD shell or batch file: FC file1 file2 FC can also be used to compare binary files: FC /B file1 file2
Run this in the CMD shell or batch file: FC file1 file2 FC can also be used to compare binary files: FC /B file1 file2
rmdir is my all time favorite command for the job. It works for deleting huge files and folders with subfolders. A backup is not created, so make sure that you have copied your files safely before running this command. RMDIR “FOLDERNAME” /S /Q This silently removes the folder and all files and subfolders.
This depends on the shell you prefer to use. If you are using the cmd shell on Windows then the following should work: FOR /F “tokens=*” %%G IN (‘DIR /B /AD /S bin’) DO RMDIR /S /Q “%%G” FOR /F “tokens=*” %%G IN (‘DIR /B /AD /S obj’) DO RMDIR /S /Q “%%G” If you … Read more
This might be what you want: cmd /K “cd C:\Windows\” Note that in order to change drive letters, you need to use cd /d. For example: C:\Windows\System32\cmd.exe /K “cd /d H:\Python\” (documentation)
This lists all the files (and only the files) in the current directory and its subdirectories recursively: for /r %i in (*) do echo %i Also if you run that command in a batch file you need to double the % signs. for /r %%i in (*) do echo %%i (thanks @agnul)
To expand on davor’s answer, you can use PowerShell like this: powershell “dir | tee test.txt” If you’re trying to redirect the output of an exe in the current directory, you need to use .\ on the filename, eg: powershell “.\something.exe | tee test.txt”
This prints it in the console: echo %cd% or paste this command in CMD, then you’ll have pwd: (echo @echo off echo echo ^%cd^%) > C:\WINDOWS\pwd.bat
As @nasreddine answered or you can use /d cd /d d:\Docs\Java For more help on the cd command use: C:\Documents and Settings\kenny>help cd Displays the name of or changes the current directory. CHDIR [/D] [drive:][path] CHDIR [..] CD [/D] [drive:][path] CD [..] .. Specifies that you want to change to the parent directory. Type CD … Read more
To extract the audio stream without re-encoding: ffmpeg -i input-video.avi -vn -acodec copy output-audio.aac -vn is no video. -acodec copy says use the same audio stream that’s already in there. Read the output to see what codec it is, to set the right filename extension.
The space before the = is interpreted as part of the name, and the space after it (as well as the quotation marks) are interpreted as part of the value. So the variable you’ve created can be referenced with %location %. If that’s not what you want, remove the extra space(s) in the definition.