Activity Stream
48,167 MEMBERS
61024 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 7 of 7
  1.     
    #1
    Member

    Default Batch script help

    First of all i am 100% noob for batch script... I am using Sabnzbd for downloading from usenet and in that prog i have option to run .bat script after download... Now i need simple .bat script which will rename .wmv or .mp4 file in folder to the same name as download folder... Can anyone help me?

    Thanks in advance...
    SiNNER Reviewed by SiNNER on . Batch script help First of all i am 100% noob for batch script... I am using Sabnzbd for downloading from usenet and in that prog i have option to run .bat script after download... Now i need simple .bat script which will rename .wmv or .mp4 file in folder to the same name as download folder... Can anyone help me? Thanks in advance... Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Banned
    Website's:
    EliteArchive.com
    Try Using an App "ReNamer"

  4.     
    #3
    Member
    I need batch script not program...

  5.     
    #4
    Respected Member
    You can make it a bat or cmd extension ..

    Code: 
    set mydir="%~p0"
    set mydir=%mydir:\=;%
    set mydir=%mydir: =:%
    set LAST=%LAST::= %
    ren *.mp4 %LAST%.*
    ren *.wmv %LAST%.*

  6.     
    #5
    Member
    Its not working i get this error :

    C:\Program Files (x86)\SABnzbd>set mydir="\DOCUME~1\ADMINI~1\Desktop\Scripts\"

    C:\Program Files (x86)\SABnzbd>set mydir=";DOCUME~1;ADMINI~1;Desktop;Scripts;"

    C:\Program Files (x86)\SABnzbd>set mydir=";DOCUME~1;ADMINI~1;Desktop;Scripts;"

    C:\Program Files (x86)\SABnzbd>set LAST=:=

    C:\Program Files (x86)\SABnzbd>ren *.mp4 := .*
    The syntax of the command is incorrect.

    C:\Program Files (x86)\SABnzbd>ren *.wmv := .*
    The syntax of the command is incorrect.
    But thanks for try...

  7.     
    #6
    Respected Member
    put the output to a single name folder like c:\downloads

    PS if you know it is always going in SABnzbd then why not just use this:

    ren *.mp4 SABnzbd.*
    ren *.wmv SABnzbd.*

  8.     
    #7
    Respected Member
    if that programs creates a new folder each time use this code:
    Code: 
    @echo OFF
    set mydir="%~p0"
    SET mydir=%mydir:\=;%
    
    for /F "tokens=* delims=;" %%i IN (%mydir%) DO call :LAST_FOLDER %%i
    goto :EOF
    
    :LAST_FOLDER
    if "%1"=="" (
        @echo %LAST%
        goto :REN_FILES
    )
    
    set LAST=%1
    SHIFT
    
    goto :LAST_FOLDER
    :REN_FILES
    ren *.mp4 %LAST%.*
    ren *.wmv %LAST%.*

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Hiring] Somenone to code simple batch script
    By STiNKY in forum Completed Transactions
    Replies: 0
    Last Post: 8th May 2011, 12:42 PM
  2. need help with some batch script
    By techdaemon in forum Technical Help Desk Support
    Replies: 0
    Last Post: 29th Mar 2011, 02:58 AM
  3. some batch help ?
    By Porsche_maniak in forum Web Development Area
    Replies: 7
    Last Post: 22nd Dec 2010, 09:42 PM
  4. [BATCH] Game!
    By l0calh0st in forum Web Development Area
    Replies: 2
    Last Post: 18th Sep 2010, 04:58 PM
  5. [BATCH] Firewall - Allow/Deny Script
    By l0calh0st in forum Web Development Area
    Replies: 0
    Last Post: 31st Jul 2010, 04:16 PM

Tags for this Thread

BE SOCIAL