texasqert.blogg.se

Commander one preparing to copy files
Commander one preparing to copy files











commander one preparing to copy files

If "!NewExtension:~0,1" = "." set "NewExtension=!NewExtension:~1!" Rem If the new file extension starts with a point, remove the point. If "!TargetFolder:~-1!" = "\" set "TargetFolder=!TargetFolder:~0,-1!"Įcho Please specify the new file extension.Įcho Default file extension is: %NewExtension% Rem If the target folder path ends with a backslash, remove the backslash. Rem Replace all / by \ in target folder path. Set "TargetFolder=%USERPROFILE%\Documents" Rem Is the batch file called without an argument/parameter?Įcho Call %~nx0 always with name of a file with full path.Įcho %~nx0 "C:\Path to folder\with file to\move with new extension.txt"Įcho specifies a directory and not a file.

commander one preparing to copy files

It can be still enhanced with more error checks. However, here is a batch script which you might use and contains already some extensions to detect some possible mistakes which can always occur when a user has to enter a path and a file extension manually.

  • change the file extension there with F2, modifing file extension and pressing RETURN.Īnd most useful for such a task would be the usage of a file manager like Total Commander which supports changing the file extension while moving the selected file(s) from left to right or right to left folder pane.
  • select the destination folder in opened window and click on button Move,.
  • select the file and click on Move to command of Windows Explorer,.
  • changing file extension and pressing RETURN.
  • pressing F2 for starting renaming the file,.
  • going to the target folder and pressing Ctrl+V (Paste).
  • selecting the file and pressing Ctrl+C (Copy),.
  • Moving a file to another folder with changing file extension can be also done with













    Commander one preparing to copy files