0

Attempting to change my working directory...

In the command prompt, my input was: cd F:

Command prompt returned: F:\

Then another line appeared, reverting my working directory back to: C:\Users\caden

Ultimately, I need to run the following command using FFmpeg, but I need to either change the current/working directory, or perhaps combine 'cd F:' with my command, I suppose...

The ffmpeg command I'm using to cut video: ffmpeg.exe -i "F:\output" -ss 00:00:01 -t 10:00:00 -c:v copy -c:a copy GENTLEWAVESFINAL.mp4

I'm attempting to move my working/current directory, yet to no avail... I Suppose the questions I need answered are:

  1. Does the command: cd change the current directory until it is altered again, or does it need to be inserted/used for each command used in the prompt?

  2. If so, then that means I would need to use cd F:\ + other code - how should the combined code look, using the commands above?

3
  • To change to drive f: you simply type F: and press enter. To go to root of a drive type cd \ and press enter. Commented May 13, 2023 at 23:28
  • I guess it should be closed as a typo, but I don't have that privilege Commented May 14, 2023 at 0:38
  • 1
    the /d switch allows the drive to also be changed
    – jsotola
    Commented May 14, 2023 at 5:11

1 Answer 1

1

Usually the change is not temporary. It is permanent till next cd/pushd/popd.

F: changes current drive to F:

cd F:\ changes current path on drive F: to root (\), does not change current drive

cd \folder changes current drive path to folder folder at the top of the hierarchy

cd folder changes current drive path to subfolder folder in current folder

cd /d C:\Windows changes current drive and folder to C: and \Windows respectively

cd .. changes current folder one level up

cd \ changes current folder to root (\) on current drive

Answering the questions:

  1. It is used once for one folder, but command pushd or popd may change this current folder.
  2. Look above for my explanations.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .