Skip to main content
Question

SystemCaller with xcopy /I /E /Y /T doesn´t create a directory


gjaguilar
Contributor
Forum|alt.badge.img+6

xcopy "$(TEMP_FOLDER)\$(FME_JOB_ID)\Temp"  "$(TEMP_FOLDER)\$(FME_JOB_ID)\Results" /I /E /Y /T

From the command line I use xcopy /I /E /Y /T and if the directory does not exist it creates it but within a SystemCaller it does not work and does not give an error message.

I need Help 

6 replies

becchr
Influencer
Forum|alt.badge.img+25
  • Influencer
  • March 7, 2024

hi @gjaguilar does it make any difference if you put the entire command itself between extra quotation marks like this?

xcopy "$(TEMP_FOLDER)\$(FME_JOB_ID)\Temp"  "$(TEMP_FOLDER)\$(FME_JOB_ID)\Results" /I /E /Y /T


gjaguilar
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • March 7, 2024

Thanks, I´ll try 


gjaguilar
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • March 7, 2024

It does not work
I enclosed in double quotes and it doesn't work
the process stops to ask if it is a file or a directory
Locally using /I /E /Y does it fine


geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • March 8, 2024

Ah yes, quotes inside quotes. This works (with and without spaces in the folder names):

"xcopy """@Value(FilePath)""" """@Value(TargetFolder)\Results""" /I /E /Y /T"


gjaguilar
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • March 8, 2024

Thanks, I´ll try  again 


gjaguilar
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • March 13, 2024

 I added a FileExistenceChecker transformer to check if the directory exists before using xcopy; otherwise I use another SystemCaller to create a directory with mkdir.

Thanks a lot


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings