I'm using Schema Compare PRO 4.032 on the command line in powershell
Here is my command:
.\schemacompare /snapshot /compress:True /connection:server=MyServer /database:MyDB /file:'I:\Snapshots\My Snapshots\MyDB_snapshot.snap'
The console doesn't display an error but the snapshot doesn't create. If I remove the space in the path and the command, it works as expected. I need to account for the space character - how do I do this in the command?
How do I reference a path with a space in it?
Re: How do I reference a path with a space in it?
Please try enclosing the path that contains spaces in double quotes.
Re: How do I reference a path with a space in it?
I tried that also. It looks like schemacompare.com is run differently in PowerShell vs Cmd Prompt.
Command run in PoSh
.\schemacompare /snapshot /compress:True /connection:server=MyServer /database:MyDB /file:"I:\Snapshots\My Snapshots\MyDB_snapshot.snap"
PoSh Output
Devart dbForge Schema Compare for SQL Server version 4.0.32.0
Copyright 2008 - 2016 Devart. All rights reserved.
=== Snapshot creation started ===
.\schemacompare /snapshot /compress:True /connection:server=MyServer /database:MyDB "/file:I:\Snapshots\My Snapshots\MyDB_snapshot.snap"
=== Snapshot creation finished ===
Notice how the double quote shifted? In the command prompt this does not occur and the command works as it should. I'm guessing this is a PowerShell issue, I'm just not sure how to fix it.
Command run in PoSh
.\schemacompare /snapshot /compress:True /connection:server=MyServer /database:MyDB /file:"I:\Snapshots\My Snapshots\MyDB_snapshot.snap"
PoSh Output
Devart dbForge Schema Compare for SQL Server version 4.0.32.0
Copyright 2008 - 2016 Devart. All rights reserved.
=== Snapshot creation started ===
.\schemacompare /snapshot /compress:True /connection:server=MyServer /database:MyDB "/file:I:\Snapshots\My Snapshots\MyDB_snapshot.snap"
=== Snapshot creation finished ===
Notice how the double quote shifted? In the command prompt this does not occur and the command works as it should. I'm guessing this is a PowerShell issue, I'm just not sure how to fix it.
Re: How do I reference a path with a space in it?
Unfortunately, dbForge doesn't support PowerShell.