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. Batch File

    in Windows 10 Software and Apps
    Batch File: Hi, I am trying to create a batch file to determine whether a user account is signed on.I don't have enough experience to get it to @Echo it worked. Any advice please.Batch file:REM Query whether user SBackup is active@echo onsetlocal enabledelayedexpansionset...
  3. Batch Files

    in Windows 10 Gaming
    Batch Files: How do i make it that my batch file puts itself in to startup https://answers.microsoft.com/en-us/windows/forum/all/batch-files/6156404d-20d4-4f58-bee5-14629dbf7b10
  4. Batch Files

    in Windows 10 Software and Apps
    Batch Files: How do i make it that my batch file puts itself in to startup https://answers.microsoft.com/en-us/windows/forum/all/batch-files/6156404d-20d4-4f58-bee5-14629dbf7b10
  5. Batch mkdir failing

    in Windows 10 Network and Sharing
    Batch mkdir failing: I have a batch file that creates a bunch of folders the problem is, it sometime gets confused.Ex. I make folders 123~1 123~2 and 123~3 but in only creates 123~2 and 123~3 so I try to create a new folder and rename it 123~1 but it tells me 123~3 already exist that is not a...
  6. Failed upgrade from Windows 7 to Windows 10 v2004

    in Windows 10 Installation and Upgrade
    Failed upgrade from Windows 7 to Windows 10 v2004: I wish to upgrade my 2010 Sony Vaio W7Pro x64bit to W10 Pro. I have tried two methods: from the website, making a Creation Tool, and a W10 Pro v2004 x64bit media DVD. Both processes run almost to the end but neither will complete. I get a variety of error messages, the most...
  7. OneDrive missing after Win10 v2004 Upgrade

    in Windows 10 Installation and Upgrade
    OneDrive missing after Win10 v2004 Upgrade: OneDrive does not appear in File Explorer pages after I upgraded to Win10 2004. I did download the OneDrive app from the Microsoft Store, up it still does not appear in File Explorer as a drive/folder. How do I fix this?...
  8. 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...
  9. 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...
  10. 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...