Windows 10: batch file fails after upgrade to v2004

Discus and support batch file fails after upgrade to v2004 in Windows 10 Support to solve the problem; The code <<"" nircmd.exe emptybin>> used to clear the content out of the Recycle Bin at startup, but now does not. How might I restore its... Discussion in 'Windows 10 Support' started by Sebastian42, Jun 25, 2020.

  1. batch file fails after upgrade to v2004


    The code <<"" nircmd.exe emptybin>> used to clear the content out of the Recycle Bin at startup, but now does not.
    How might I restore its functionality ?

    :)
     
    Sebastian42, Jun 25, 2020
    #1
  2. oily_17 Win User

    Batch Files Knowledge Base

    Don't use batch files very much but one I find useful is for creating a list of files in a directory.
    Just copy the text below into Notepad and save as Filelist.bat

    dir /a /-p /o:gen >filelist.txt

    When you run it from a folder it will create a Filelist.txt file,in the same folder, that lists all the files in that folder.Useful when you are too lazy to type all the files out yourself.
     
    oily_17, Jun 25, 2020
    #2
  3. Batch Files Knowledge Base

    Very nice and usefull thanks for contributing.
     
    AphexDreamer, Jun 25, 2020
    #3
  4. fahnix Win User

    batch file fails after upgrade to v2004

    Batch files fail pathing and [%04d]

    1 When running in Administrator mode batch files automatically take on the Windows\System32 folder unless a prefix is added to the top of the file.

    command example: copy file1.txt "C:\Users\Public\Test\."

    result copies file in current folder to "C:\Users\Public\Test\file1.txt"

    result from batch file as admin is an error stating "File not found" because Admin mode attempts to call commands listed in file from [Windows\System32] folder.

    include [cd %~dp0] at top of batch file to ensure commands run from the folder the batch file resides in.

    2 When running ffmpeg.exe in one folder and writing files to another folder from a batch file Windows automatically pastes the entire path and the batch file name prior to every attempted file write.

    ffmpeg command example :

    bin\ffmpeg.exe -i "C:\Users\JoeMatize\Videos\Logitech Webcam\video 3.wmv" -r 15 "frames-%04d.bmp"

    then windows creates 15 frames per second naming files [frames-0001.bmp] through [frames-0015.bmp] for the 1st second and continuing through the entire file

    But ffmCmd.bat file contains the command attempts to create the output file as...

    "C:\_dev\_Video\FFMPeg_Zeranoe\ffmpeg-20160517-git-af3e944-win64-static\ffmCmd.bat4d.bmp"

    ffmpeg fails when it is unable to acquire a new name for the sequential files.

    is there another command that will fix the batch call to ffmpeg, like the one that fixes the administrative mode path?

    When will Microsoft fix the batch files so they work consistently across the board?
     
    fahnix, Jun 25, 2020
    #4
Thema:

batch file fails after upgrade to v2004

Loading...
  1. batch file fails after upgrade to v2004 - Similar Threads - batch file fails

  2. Create batch files with Batch?

    in Windows 10 Software and Apps
    Create batch files with Batch?: How to create Batch and VBS files with Batch? So I write a batch file which I then convert to exe that creates new folders in a certain directory and then creates batch and VBS files with a certain content and saves them in the created folder. So it's similar to a program...
  3. W10 v2004 text files

    in Windows 10 Support
    W10 v2004 text files: Hi, for a variety of reasons i had to do a new install of W10 pro, I keep my subscription keys in text files, some go back years, whwn i try to open an existing text file in notepad or wordpad in the new install the text appears in what looks like a chinese font, i have tried...
  4. Batch Files

    in Windows 10 Network and Sharing
    Batch Files: I want to make a batch file that will copy a specific folder from my USB stick to a folder on C:\ I want to know if it's possible to make a batch file that will take the folder from my USB drive no matter what the drive's letter is....
  5. Batch File

    in Windows 10 Support
    Batch File: I need a batch file to create a folder with sub folders. The sub folders will be named the current date, they will go in a folder on c drive. For example we can call the folder test and it would be in documents on c drive. Every time we run the batch file it would create a...
  6. Batch Files

    in Windows 10 Network and Sharing
    Batch Files: I cannot remember how to open a FILE browser in batch, i was trying to create something were it opens a file browser, and the file you click on, gets deleted. https://answers.microsoft.com/en-us/windows/forum/all/batch-files/335a0e0d-62b0-4615-b303-4a7bb548cc6c"
  7. mozbackup failing in batch file

    in Browsers and Email
    mozbackup failing in batch file: I know that the author is no longer supporting mozbackup. But I'm experiencing a problem that I thought perhaps someone has found a fix for. I run mozbackup from a batch file with a single line of code: MozBackup.exe default.mozprofile default.mozprofile contains...
  8. batch file

    in Windows 10 Network and Sharing
    batch file: I want a BAT file to be executed when a USB plugged in to the PC. How can I do it? https://answers.microsoft.com/en-us/windows/forum/all/batch-file/1af5ec02-b6c8-4916-959b-ed0327a964e7"
  9. After 1803, batch file no longer works

    in Windows 10 Installation and Upgrade
    After 1803, batch file no longer works: I'm having with the batch file below on computers that have Windows 10 1803. This script works fine on Windows 10 1709 and earlier as well as Windows 7. The only error I get when I run this on 1803 is Error 1603. I've tried the various fixes online with no success (sorry,...
  10. Batch File Help

    in Windows 10 Software and Apps
    Batch File Help: I've never dabbled much in batch files, as I've usually been able to find pre-made ones to do what I wanted. We have an application that handles user data backups. It has three services, and at times, one or two of the three don't start automatically. If you stop and start...